LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple PID pulse problem

Hello All,

I am trying to modify the PID single channel example case to incorporate a short pulse cycle (initialize 2 sec, on 2 sec, return/hold 2 sec). I have implimented the pulse sequence using a state machine running in a loop parallel to the control loop. The attached vi seems to work fine when I test it on simulated hardware (PCI-6259), however when I deploy it to my realtime box (desktop) the pulse loop doesnt seem to execute correctly. Does anyone have any ideas on what might be going on? Also, is there a more elegant way to handle the timing of the pulse sequence? I would appreciate any input that anyone may have.

Thanks!

-Nate
LV 8.5, RT 8.5
0 Kudos
Message 1 of 4
(3,080 Views)

Hi Nate, thank you for using our discussion forums.

 

I was able to successfully run this VI on my system with both simulated and actual hardware (NI-6251), so this may be a Real-Time issue.

 

First off, what is the "realtime box" that you refer to, and what OS are you running?  How many cores does your Real-Time Processor have?  How fast are you planning on performing input and output?  What do you mean when you say that the pulse loop is not executing correctly?  It is throwing an error? If so can you give me a description of the error?  If not can you give a description a bit better how you determined that it is not running correctly?

 

If you can provide a bit more information we will be able to provide better help.

 

Chris_K

0 Kudos
Message 2 of 4
(3,042 Views)
Hi Chris,

Thank you for the reply. I am using a converted desktop PC (P4, single core) as my realtime target, running the ETS RTOS. The problem I am seeing when I deploy the vi is that the loop that changes the setpoint, what I've called the 'pulse loop', will not execute until the PID loop is stopped. In other words, if I push the 'Start Pulse' button on the front panel nothing happens until after I push 'Stop', after which it seems to execute fine (I can see the 'Current setpoint' indicator increment up and then back down and the 'start pulse' indicator light comes on).  

The control loop only needs to run at (max) 1kHz.  When (if?? Smiley Happy ) I can get this to work I will also need to include AI sampling at 40kHz for 8 other channels while the 'pulse loop' is running and write the data to file.

Thanks for your help. I'd appreciate any input that you may have.

-Nate

0 Kudos
Message 3 of 4
(3,037 Views)
Hi Nate,
 
Are you still seeing this behavior or have you found a workaround?
David_B
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,920 Views)