LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for Examples: Process Control with Data Acquisition and Rapid Shutdown

Solved!
Go to solution

Hello!  There's a long explanation below, but briefly I'm looking for examples of process control loops with data acquisition and high speed (<1ms) shut down responses upon detection of an off-normal condition.  Thanks!

 

I'm working on an experiment to detect critical heat flux (CHF) in heated material samples.  The process involves controlling two pumps (heating and cooling loops) and a power supply (providing heat).  When the CHF event occurs, the temperature of the material rises rapidly (~1000 degrees C/second).  I'd like to detect this temperature excursion and shut off the power supply as quickly as possible (within a few milliseconds of detection) to prevent damage to the material and the test loop.  Also, I'd like to log the data every 500ms or so.

 

My code (LabView 2017) sort of works.  All of the code is contained in one VI with 5 while loops (I'll post an example of it later).  I'm using an SCXI-1000 and NI-6289 card for my data acquisition and writing loops and a NI-6259 USB card to monitor the thermocouples and control the power supply (and perform the safety shutoff).  My loops are as follows (with approximate iteration times in parentheses):

 

  1. Data Acquisition and Viewing Loop (~500ms)
  2. Data Check and Record Loop (~500ms)
  3. Pump Control Loop (~500ms)
  4. Power Supply Control and Safety Trigger Loop (~2-4ms)
  5. Power Supply Ramp Loop (adjustable from 1-3600s to ramp power)

Again, my code is all in one VI running 5 simultaneous while loops.  I think I need to switch to a producer-consumer state machine style, but I've not been able to find examples of response times for that sort of setup.  Could someone point me in the right direction of some examples that would help me convert my code?  Thanks again for your time!

 

 

0 Kudos
Message 1 of 15
(2,597 Views)

Is the code running on your desktop/Windows computer? Looking at the SCXI-1000 makes it appear more like a hub for IO cards than a separate computer (a-la cRIO, PXI chassis etc). Is that correct?

 

If so, you might struggle to implement what you want with the sort of guarantee you're presumably looking for. For a safety-related circuit, you really want either FPGA control or a custom electronics solution via PCB etc. Once you need processing on a non-RT OS, guaranteeing sub-ms responses is as I understand it tricky.

 

Producer/Consumer might make it easier to command each of your blocks of code (but it might not, hard to guess without seeing your code overview) but it's unlikely to provide a significant improvement to response time compared with 2ms.


GCentral
Message 2 of 15
(2,569 Views)

cbutcher,

 

Thanks for your response. Yes.  I'm using the SCXI-1000 to collect signals from I/O cards (and the NI-6259 is doing the same), which are handled on the desktop PC. Is there a

 

Speaking with a colleague, I've been advised to go to Producer/Consumer architecture, where the Producer is running on the SCXI-1000 (reading channels, looking for shut down triggers, and sending data to the UI on my desktop) and the Consumer is a UI running on my desktop.  I've not been able to find documentation regarding running RT VIs on the SCXI-1000 (or the NI-6259).  Is this possible to do?

 

0 Kudos
Message 3 of 15
(2,564 Views)
Solution
Accepted by topic author elward

I'm also not able to find documentation suggesting that it's possible to run VIs directly on the SCXI-1000 without a separate computer attached. As far as I can understand it, the SCXI chassis contains one or more IO modules where one (or more, if parallel mode is chosen) of the modules are attached via cable to the PC or another DAQ device. Is this the role being played by your NI-6289 card?

 

Can you send an image showing your project view containing the SCXI-1000? For example, when you add a cRIO device to a project 

new-target.png

it appears like so:

crio.png

(although you might choose to add an existing device if you had one to hand, in which case the IP address would not be unconfigured).

This allows me to add VIs directly to the cRIO target (not the "My Computer" target).

 

I'm not sure that it's not possible, but I haven't found any documentation that at least to me makes me think you can do the same with the SCXI chassis. How does the chassis appear in your project? (Or is it only visible via the DAQ(mx?) Channel Name blocks and similar?)

 

If it is possible to add VIs directly to the SCXI chassis, then having that running a P/C as you describe is a good solution (code on chassis, UI on desktop).


GCentral
Message 4 of 15
(2,557 Views)

cbutcher,

 

Thanks again!  I'm not able to access my code today or computer today, but will be able to post both tomorrow morning.  I've just been adding VIs to the "My Computer" location and haven't added the SCXI-1000, NI-6289 card, or NI-6259 USB to my project directly.  I've been using DAQ-mx VIs to query the three systems.  I'll try adding them to my project to see if I can run VIs on them directly.

 

I found something that's encouraging regarding RT use on the SCXI-1000 chassis.  According this this document, RT use should be supported.

 

http://www.ni.com/product-documentation/6914/en/#chassis

 

Thanks again for your support.  I'm pretty new to this and your input has been extremely helpful.

0 Kudos
Message 5 of 15
(2,544 Views)

Hi elward,

 

no, the SCXI boxes don't support any RT system running "inside" the SCXI chassis on its own. (It's a "dumb" device, no CPU involved.)

SCXI just means "Signal Conditioning eXtensions for Instrumentation", nothing more, nothing less…

 

Your SCXI chassis needs to be connected to some other DAQ device, like your NI-6259/6289. It applies "signal conditioning" and operates as an "extension" to your DAQ card!

 

  • Data Acquisition and Viewing Loop (~500ms)
  • Power Supply Control and Safety Trigger Loop (~2-4ms)

It sounds wierd to have a DAQ loop (producer) running at 2Hz, and a Safety loop (consumer) running at ~400Hz: why should the consumer run (much) faster than the producer???

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 15
(2,540 Views)

GerdW,


Thanks for the information.  Currently, my DAQ loops are running on signals input to the SCXI-1000 and the NI-6289.  The VI is run on my desktop, however.  My Safety Trigger Loop is running in the same VI, but using inputs and outputs on the NI-6259.

 

My reading has pointed me towards a producer/consumer architecture, but I've not done that yet (still just running 5 parallel while loops with all but the Safety Trigger loop using data from the SCXI-1000 and NI-6289).

 

Could the NI-6259 be used as RT target?

0 Kudos
Message 7 of 15
(2,533 Views)

Hi elward,

 

Could the NI-6259 be used as RT target?

No.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 15
(2,531 Views)

Thanks again!  Is it a similar story for the NI-6289?

 

Given my current equipment (NI-6289 linked to SCXI-1000 and a standalone NI-6259), can I run LabView RT to improve my response time?

0 Kudos
Message 9 of 15
(2,529 Views)

Hi elward,

 

Thanks again! Is it a similar story for the NI-6289?

Yes. It's a similar DAQ card from the same series of DAQ devices…

 

Given my current equipment (NI-6289 linked to SCXI-1000 and a standalone NI-6259), can I run LabView RT to improve my response time?

No, atleast not running on those devices.

You may try to run LabVIEW-RT on your PC.

It requires, among other things:

  1. a very special kind of PC
  2. to format your harddrive and install a different (RealTime) OS
  3. a different LabVIEW license (including the RT module)
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 15
(2,527 Views)