02-22-2010 02:17 AM
Greetings,
I am relatively new to cRIO and up until now i have been successfully writing FPGA code to acquire data, Target to Host DMA transfers (DMA FIFOs) and then will have a RT Host VI that would read the data and display on the FP. This was so far done with single PC talking to single cRIO in field with only RT host VI front panel updating.
My next task is to have 4 cRIOs in field, each acquiring like 4 AI channels (NI9234) at ~26KHz and have one LabVIEW HMI interface in the control room showing data from all 16 AI channels in the field. I do not prefer to have 4 RT host VIs running with 4 FP open in the control room. I want one VI on control room PC showing 16Ch AI data into one user interface. I have more of a design questions.
Note: most likely 4 cRIO will run the same code.
1- What is the general design pattren followed in such circumstances? Any DevZone link? white paper that talks in technical detail as to whether u use shared var, RT FIFOs, TCP etc etc I am sure this has to be done before.
2- Do you generally write 4 RT Host VIs, that talk to one PC VI in control room? If yes whats is the best way to publish data from 4 RT Host VIs that can be read into one HMI in control room (CR).
3- What would be nice is you connect to cRIO and get data on demand. In other words, the cRIO will only send data when PC VI is connected to it and not waste the bandwidth.
Expert ideas, reading materials welcomed. Thanks all.
02-22-2010 02:01 PM
Hi Paracha,
If you have not seen the CompactRIO Developer's Guide, you should check it out http://www.ni.com/compactriodevguide/
It discusses recommended architectures for cRIO. Currently it primarily focuses on architectures for control, however the section on adding HMIs should be quite helpful for your application.
Let me know if you have any questions after looking over that section.
Kurt
02-22-2010 06:03 PM
Paracha wrote:Greetings,
I am relatively new to cRIO and up until now i have been successfully writing FPGA code to acquire data, Target to Host DMA transfers (DMA FIFOs) and then will have a RT Host VI that would read the data and display on the FP. This was so far done with single PC talking to single cRIO in field with only RT host VI front panel updating.
My next task is to have 4 cRIOs in field, each acquiring like 4 AI channels (NI9234) at ~26KHz and have one LabVIEW HMI interface in the control room showing data from all 16 AI channels in the field. I do not prefer to have 4 RT host VIs running with 4 FP open in the control room. I want one VI on control room PC showing 16Ch AI data into one user interface. I have more of a design questions.
Note: most likely 4 cRIO will run the same code.
1- What is the general design pattren followed in such circumstances? Any DevZone link? white paper that talks in technical detail as to whether u use shared var, RT FIFOs, TCP etc etc I am sure this has to be done before.
2- Do you generally write 4 RT Host VIs, that talk to one PC VI in control room? If yes whats is the best way to publish data from 4 RT Host VIs that can be read into one HMI in control room (CR).
3- What would be nice is you connect to cRIO and get data on demand. In other words, the cRIO will only send data when PC VI is connected to it and not waste the bandwidth.
Expert ideas, reading materials welcomed. Thanks all.
1- What is the general design pattren followed in such circumstances? Any DevZone link? white paper that talks in technical detail as to whether u use shared var, RT FIFOs, TCP etc etc I am sure this has to be done before.
Shared variables are by far the easiest. RT FIFO's not necessary unless you are streaming data. TCP IP is good for streaming to, but shared variables make it easy mode.
2- Do you generally write 4 RT Host VIs, that talk to one PC VI in control room? If yes whats is the best way to publish data from 4 RT Host VIs that can be read into one HMI in control room (CR).
Your RT Host VI should never be run from a HMI or test machine. The back end for these is not very fast. You are way better off setting all the RT VI's to run at startup on the cRIO controllers and wait for a command from the host VI(via shared variables) to start doing whatever it is they do.
3- What would be nice is you connect to cRIO and get data on demand. In other words, the cRIO will only send data when PC VI is connected to it and not waste the bandwidth.
You can create a 'heartbeat' or 'watchdog' shared variable on the host PC that changes once a second. If the cRIO does not detect a change in a few seconds, it recognizes that is it disconnected. Or, you can just have the PC send a command to request data when it is ready, then start streaming TCP/IP or whatever you choose. This is entirely possible with many ways to do it.
Good document: Using the LabVIEW Shared Variable