PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

RT Multiple timed loops application

Hello!

 

I have a RT application over PXI 8196, using 7350 motion module for control on 8 stepping motors and 8 piezo actuators (by voltage AO).

Using LV 11 and LVRT 

The previous version (written in LV 😎 of the application was assembled from the following:

  • Slow while loop for DAQ from host
  • Fast while loop for controlling all piezo and SM channels in my systems (using a simple compensation code)

After exploring timed loop mechanisms I decided to replace the loops to timed loops w/ different periods.

In addition, I tried separating the channels into 6 different channels with same priority and period.

 

After doing that I get bad behavior in the last channel (it performs high overshoot which causes my system a drift)

Are my modifications are good RT practice?

If so, why does this last channel behaves in such an awful matter?

 

 

Thanks,

Yakir.

0 Kudos
Message 1 of 8
(5,879 Views)

Hi again,

 

I add the old and new versions of the RT code.

 

Yakir.

Download All
0 Kudos
Message 2 of 8
(5,852 Views)

To better assist you, I'd like to confirm several things about your setup.

 

1. Are you using the analog output of the 7350 to control the piezo actuators?

2. What is the model number of the chassis you're using?

3. Are you using any other hardware components in your setup, such as a DAQ card?

4. Between your old code and your new code, you separated the control for the 8 motor axes into separate loops, correct?

5. You also changed from using the 73xx analog functions to DAQmx functions to control the analog out, correct?

6. Are you able to control the piezo actuators without any issue?

7. Is the last channel in which you are seeing bad behavior controlling a motor axis?

 

Mike

0 Kudos
Message 3 of 8
(5,824 Views)

Dear Mike,

 

1. Are you using the analog output of the 7350 to control the piezo actuators?

 

Right.

 

2. What is the model number of the chassis you're using?

 

8018

3. Are you using any other hardware components in your setup, such as a DAQ card?

 

Right, I have 3X6704 cards, and 3X6025E DAQ cards.

4. Between your old code and your new code, you separated the control for the 8 motor axes into separate loops, correct?

 

Right, although I tried to run all 8 axes in one timed loop.

 

5. You also changed from using the 73xx analog functions to DAQmx functions to control the analog out, correct?

 

Nop, the DAQ and AO is identical in terms of its configuration. Motion cards control on piezos, and other DAQ cards control on an external analog RF modulator (DIO and AIO)

6. Are you able to control the piezo actuators without any issue?

 

Yes.

7. Is the last channel in which you are seeing bad behavior controlling a motor axis?

 

Not quite, it's the 6th channel out of 8.

 

Thanks,

 

Yakir.

 

0 Kudos
Message 4 of 8
(5,820 Views)

Thanks for clarifying those points. I have a few more questions for you to try to narrow down the issue further.

 

 

Is the trouble stepper motor a different make or model from the others?

Are the instructions you're sending this motor different from the others in any way?

Did you attempt to implement any new functionality of the motor between the old code and the new code?

Is the position of the axis staying within the limits you have set?

 

In addition, I recommend reducing the complexity of your code. Try to reorganize it so that you may control the motor axes independently from the rest of your hardware setup. Being able to call individual axes would be even better. This will make troubleshooting much easier. As it stands, it'll be very difficult to use normal troubleshooting techniques (breakpoints and highlight execution) to determine where your code may be behaving unexpectedly. It appears that you're commanding each of the motors to complete very similar actions. As such, you should place these actions in a sub VI and call it with each of the different axes. This will reduce the amount of code you have to troubleshoot and enforce more uniform behavior between each of the axes.

 

Mike

0 Kudos
Message 5 of 8
(5,795 Views)

 

Is the trouble stepper motor a different make or model from the others?

 

Nop, Same configuration.

Are the instructions you're sending this motor different from the others in any way?

Nop.

Did you attempt to implement any new functionality of the motor between the old code and the new code?

Nop, Identical.

Is the position of the axis staying within the limits you have set?

Yes.

 

Just for claryfing, The problems I have caused in the piezo actuator AO sent from the DAC of the motor axis,and not from the stepper motor itself.

I agree that the code should be arranged better (subVIs), but I would like to understand the best threads architecture for my systems' performence.

I tested system response today, and I measured modulations which depend on the loop rates I put.

When I decreased loop rates the modulations disapeared.I still didn't figured out why.

 

Yakir.

 

0 Kudos
Message 6 of 8
(5,767 Views)

Hi,

 

I've tried running a trace execution test on this RT VI as the toolkits' manual says, but the session isn't exported to the trace toolkit. 

I did an identical vi to the start and stop&send to host vi in its help page.

 

Why can't I run this test on my vi?

 

Yakir.

0 Kudos
Message 7 of 8
(5,762 Views)

There shouldn't be any inherent problem with separating separate motor axes into different threads. But, if these threads share data, you need to be careful about how you pass it between them.

 

Could you please elaborate on the "modulations" you're referring to? I'm not quite sure what this term references.

 

Could you also provide more explanation as to the failed trace execution test you're performing? I'm unsure what you mean about the session not being exported and what you attempted to do with an identical VI.  Posting screenshots of any errors or messages would also be helpful.

 

Mike

0 Kudos
Message 8 of 8
(5,743 Views)