LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx on Host for cRIO Module

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:

 

jed255_0-1631712391729.png

 

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:

 

jed255_1-1631712576257.png

 

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.

0 Kudos
Message 1 of 9
(1,745 Views)

This might be helpful - https://www.ni.com/en/support/documentation/supplemental/08/understanding-ni-compactrio-scan-mode.ht...

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(1,733 Views)

Thanks for the response Santhosh but the question is in regards to Real-Time (NI-DAQmx) mode not scan mode.

 

jed255_0-1631716502756.png

 

0 Kudos
Message 3 of 9
(1,727 Views)

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

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 9
(1,700 Views)

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.

0 Kudos
Message 5 of 9
(1,695 Views)

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

Kudos are welcome...
0 Kudos
Message 6 of 9
(1,685 Views)

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:-

sahsak_0-1737740835986.png

 

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.

 

0 Kudos
Message 7 of 9
(259 Views)

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:-

sahsak_0-1737740835986.png

 

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:

  • Create a VI for your cRIO, to control all hardware connected to the cRIO.
  • Create a VI for your host computer to control the Bronkhorst.
  • Setup a communication between both VIs/computer to exchange data and commands…

@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!

Best regards,
GerdW


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

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 9
(230 Views)