I am trying to create something to simulate drawing cards until the face values add up to at least 21 (like blackjack, but you are dealt until you get 21 or bust). However, I don't want to show extra IMAQ image Controls on the front panel if possible, which begs these questions:
Is there a way to create a control during the execution of the VI?
Sample situation:
Place 9 IMAQ Image Controls and create an inconveniently long sequence to pick a random card that is still in the deck, then place it in Control1 and add its value to the total value, then duplicating this process and placing it next in the sequence, until you reach a total value of 21.
That would take an extremely long time.
I don't want those extra green IMAQ Controls if I don't need them.^
My ideal structure have some sort of for loop that would create a new Image Control for each iteration (1 iteration = drawing 1 card), then execute the commands to display the picture of the card drawn.
Any help would be much appreciated.
Thanks in advance,
Trojan
In your particular case, I would just create an array of regular picture controls (I'm not sure if the IMAQ picture control can be in an array, but if it can then you can use that) and then simply use the array's Number of Columns property to control how many elements are visible.