Hello,
Thank you for contacting National Instruments.
My guess is that the variable is being overwritten by the first call (Load Constant to Variable VI) of the onboard program. The order of operations for the second VI appears to be the following:
1) Load Constant to Variable (variable 1 = 10000)
2) Run the onboard program
3) Onboard program calls Load Constant to Variable (variable 1 = 0)
Any value that the first step of the onboard program loads (step 3 above) will overwrite the value loaded just before the onboard program runs (step 1 above).
I have attached an image of the block diagrams for both VIs I used for testing. The first VI loads an initial value into variable 1, starts program storage, loads position, loads veloci
ty from variable 1, loads acceleration and deceleration, starts motion, then ends storage. The second program simply loads a new value into the variable then runs the stored program. As the variable value in the second program is modified, the velocity changes appropriately. I tested this with a PCI-7344 in LabVIEW 7.1 with NI-Motion 6.1.3.
Hopefully this will help you track down the source of the problem.
Best Regards,
Jesse D.
Applications Engineer
National Instruments