LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulation Loop ODE Solver

Solved!
Go to solution

Good idea about the SubVI Node Setup. I changed the period for all the in-loop maxon VIs to .1 and it got the simulation closer to wall time (1s~7s as opposed to 1s~10s) but not all the way there. Not surprisingly, the data from the maxon VIs wasn't very smooth. I also tried setting the period to -1 to match the sampling rates to the simulation loop sampling rate, but that had little effect on the simulation time/wall time issue.

 

Unfortunately, it does not appear that I can control voltage. What do you mean by setup current control?

0 Kudos
Message 21 of 23
(665 Views)

Hi Barp,

 

I've gone back and made the simplest program I can in the simulation loop. I generate a square wave which I send to the maxon motor controller as a current input. Then I measure the current and read it in to labview. For a 10sec labview test, it still takes 13 seconds on the wall clock. And this is when the period on the SubVI Node Setup is .1. Is there something inherent in the simulation loop that is slow? Might I achieve faster results with some other type of loop?

 

Thanks,

Brian

0 Kudos
Message 22 of 23
(640 Views)

Hey Brian

 

Lets do another test. For you to do square wave in open loop, you don't need simulation. Can you code it using While loop or Timed-loop? If you try this way, what is the maximum speed you can have ? It could be possible that the problem is not simulation.

Let me know when you have the numbers...

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 23 of 23
(632 Views)