Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatacal axis definition

Hello!

My application has to choose between axes automatically. I am trying to define the axis by "read variable.flx" that should read the axis number and pass it through the output into the "load velocity.flx" and so on (see attached VI). However it does not work and error 70006 occurs. What is the problem?

Thanks.
0 Kudos
Message 1 of 7
(4,135 Views)
I've tried your example and it just works fine with my configuration:

PCI-7344,
NI-Motion 6.1.5

Have you put a probe on the wire that passes the axis value to the load velocity.flx? With a four axes board values from 1 to 4 are valid and shouldn't generate an error.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 7
(4,114 Views)
Jochen,

I have the same configuration and it does not work. I tried to simplify even more the example (see attached VI) and it does not work too (it cannot read the output value). If I try to look in MAX after running this program it shows me another error message (attached in the next reply). Hope you can understand what is going on.
0 Kudos
Message 3 of 7
(4,109 Views)
Attached is the error message.
0 Kudos
Message 4 of 7
(4,108 Views)
Jochen,
I have restarted my PC and the above problem was eliminated. But when I tried to run the first program in an on-board manner (see the attached VI), the problem of error 70006 appears again (see the first message for details).
0 Kudos
Message 5 of 7
(4,105 Views)
I see the problem. The issue has to do with the fact that the onboard program is not a LabVIEW program following the dataflow principle. Thus passing the axis number from an onboard variable to the following function doesn't work. You could load the velocity value from the onboard variable as you can define the location of the value with the input vector but you can't do this for the axis constant.

Here is an idea for a possible workaround:
Add jump labels to your onboard program and use the conditional jump to go to the sequence of code following the jump label depending on the axis number. If you have four axis you will have to copy your code four times for each axis and paste it after the corresponding jump label. You will have to add some more conditional jumps to complete the application but basically it should work.

Best regards,

Jochen Klier
National Instruments Germany
Message 6 of 7
(4,101 Views)
Well, the truth is that I just tried to shorten this last solution...

Thank you for your help.
0 Kudos
Message 7 of 7
(4,096 Views)