09-15-2021 08:40 AM
Anyone know if there is a way to read from a cRIO AI card using DAQmx from the host system? Seems like it can be done in NI MAX (maybe not sure how that works in the background) but in LabVIEW you have to create a project with the target before it works. Just wanted to see if there is way to just read it directly on the host by changing the Physical Channel name or something.
I have a 9220 card in a cRIO-9045 chassis and I can use the MAX test panel to read it in DAQmx mode:
But if I try to use that Physical Channel in a host system LabVIEW vi then I get an error. This is using the DAQmx example Voltage - Continous Input:
Just to be clear I know that it would work if I move that VI to the target in a project but that's not the question.
09-15-2021
09:31 AM
- last edited on
05-08-2024
12:52 PM
by
Content Cleaner
This might be helpful - https://www.ni.com/en/support/documentation/supplemental/08/understanding-ni-compactrio-scan-mode.ht...
09-15-2021 09:36 AM
Thanks for the response Santhosh but the question is in regards to Real-Time (NI-DAQmx) mode not scan mode.
09-15-2021 11:45 AM
This articles tells something about that - https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019PUNSA2&l=en-US
BTW - I have not done that but just searching for articles that might tell how to do that or say it is not possible
09-15-2021 12:00 PM
Yeah, I've seen that article and done that. I've used DAQmx with cRIO-904x controllers a lot so I'm not asking about getting started.
The question is can you use DAQmx from the host machine with a remote cRIO module. I haven't found any articles or forums that address this question specifically. It very well could be that it's not allowed (or possible) but just wanted to check since it seemed like NI MAX Test Panels might be doing something like that.
09-15-2021 01:33 PM
To my knowledge you cannot use a cRIO like a cDAQ-chassis (i.e. starting a DAQmx from the host system).
Perhaps this is by design - otherwise a cRIO would be very similar to the discontinued cDAQ-controllers.
Regards, Jens
01-24-2025 11:49 AM
Hi I have a similar question. I have a mass flow controller from Bronkhorst, which is connected to the PC directly through RS232/flowbus. It has no physical connection to the NI cRIO9054. I need to control and read other mass flow controllers, valves and temperatures using thermocouples which are connected to the cRIO through different modules.
If I'm making my VI inside the cRIO tree, LV is not able to access the Bronkhorst MFC. It shows this error:-
If my VI is under my computer tree, the DAQmx is not working, means I am not able to see and record the temperature.
Is there any way to solve this issue? I only want to have one VI where I can control, see and record all the datas.
01-24-2025 01:10 PM
Hi sahsak,
@sahsak wrote:
I have a mass flow controller from Bronkhorst, which is connected to the PC directly through RS232/flowbus. It has no physical connection to the NI cRIO9054.
When the Bronkhorst is connected to your host computer then you need a program running on the host computer to communicate with that device.
@sahsak wrote:
I need to control and read other mass flow controllers, valves and temperatures using thermocouples which are connected to the cRIO through different modules.
Your cRIO can communicate with all devices/sensors that are physically connected with the cRIO.
@sahsak wrote:
If I'm making my VI inside the cRIO tree, LV is not able to access the Bronkhorst MFC. It shows this error:-
If my VI is under my computer tree, the DAQmx is not working, means I am not able to see and record the temperature.
Is there any way to solve this issue?
The simple solution is:
@sahsak wrote:
I only want to have one VI where I can control, see and record all the datas.
This VI should run on the host computer: it's much easier to record data on the host computer…
The example projects for cRIO/Realtime explain how to exchange data between cRIO and host!
01-25-2025 09:51 AM - edited 01-25-2025 09:53 AM
If you want to talk to hardware on the cRIO you will have to write a program on the cRIO realtime controller to talk to that hardware. If you want to talk to hardware connected to your PC, you have to write a program on the PC that talks to that hardware.
Last but not least you want to have an application on your PC to operate the whole (and no this definitely won't be a single VI!)
So you have two possibilities in fact:
1) - write a cRIO program that does the DAQmx part and can communicate the data to your host application
- write a PC host application that talks to the Bronkhorst hardware, communicates to your cRIO application and
analyzes/displays/logs the data as needed.
2) - connect the Bronkhorst hardware to your cRIO instead, the USB host port together with a reasonable USB to
RS-232 converter can provide you with the necessary serial port
- write a cRIO program that does the DAQmx and Bronkhorst part and can communicate to your host application
- write a PC host application that communicates with your cRIO application and analyzes/displays/logs the data as
needed.
Basically, if you only want to have to write a single application on your host PC, you should have bought a cDAQ chassis instead of a cRIO chassis.
Or if your hardware timing requirements on the DAQ side are complex and very fast, you may even have to write a third program to run on the FPGA side inside the cRIO, to do the hardware control of the DAQ channels there, and communicate the necessary data to the RT application on the cRIO instead of using DAQmx.