08-26-2011 08:43 PM
Good day again NI experts,
I have a problem about needing to use data from 1 state into another in VBAI. In my program attached, I have 3 Barcode reading States in a Loop. If "Matrix Bot Bk1" fails, "Matrix Bot Bk2" will read and if it also fails, "Matrix Bot Wt" will read and if it fails, the program will loop back to "Matrix Bot Bk1" until 1 succeeds then proceed to the next State where I will process the Barcode reading. Based on the program loop, only 1 of 3 Barcode readings should pass.
I've made this program because I need to read Barcode data from different PCB materials where I also need to control 2 lightings, White and Blue. The problem is that in the next State where I will process the data, In the calculator step, I can't see the VARIABLES FROM PREVIOUS STATES. Hope you can help me with my problem. Thank you very much.
Sincerely,
Andrei K.
Solved! Go to Solution.
08-26-2011 09:42 PM
You can create a variable from Tools>>Variable Manager, and then use the Set Variable step to set the barcode string to this variable in each of the steps. This variable will have the barcode string value of the step that last updated it, so you can use this variable in the Calculator step in a different state. We hope to have the Calculator step able to access previous results from different states in a future release, but until then, you can use Variables.
Hope this helps,
Brad
08-30-2011 12:55 AM
Mr. Brad,
Again, thank you so much for your help.
Sincerely,
Andrei K.