Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

A large program with MANY .vi's loads an onboard program to a 7344 board, later in anothor .vi I load a value into var = 1. and then run Onboard program. Program runs but value of var =1 is not used.

Onboard program calls the "Load constant to variable.vi" in first block. Same call is made in labview code just before the run program block. the variable in the onboard program ALWAYS defalts to (0). WHY???
0 Kudos
Message 1 of 2
(2,967 Views)
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
0 Kudos
Message 2 of 2
(2,967 Views)