Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I put some vi into a crio?

I would like to use the serial port on a crio to reveive data from a communication device. And I have developed a vi that it works fine on a PC. How should I put the vi into the crio? I do have the crio development guide, but it takes like forever to read. May I have some key steps or hints to start off? 

 

Thanks a lot!

0 Kudos
Message 1 of 6
(5,087 Views)

Hi Zeta,

 

Are you using the cRIO in FPGA or scan mode? Using the serial port should be a pretty simple process. Within MAX under devices and interfaces for your CRio you should be able to see the serial port. Then you are able to use it using the VISA drivers set which I guess is what you currently using on your development system.

 

Please find the following links to resources which will hopefully help you achieve this:

 

Serial Data Transfer Between cRIO and Host

how do i read from a RS-232 to cRIO

RS-232 Interface Reference Example for LabVIEW FPGA

 

Hopefully these links will help you and provide some pointers.

 

Let me know how you get on and I will help you further.

 

Many Thanks,

Aaron. E
Product Performance Engineer
Dyson
0 Kudos
Message 2 of 6
(5,082 Views)

Thanks for you quick reply Aaron!!

I don't think I will use FPGA of cRIO.

I will try the link you provide. And I will find out  how it will go next week.

Thank you!

0 Kudos
Message 3 of 6
(5,071 Views)

Hi Aaron

 

I have already known how to develop a vi to receive data from serial port. And it works fine with computer. My problem is how I creat a cRIO project, which means to integrate the vi with the cRIO hardware.

 

Many thanks

0 Kudos
Message 4 of 6
(5,051 Views)

Hi Zeta,

 

The process should be the same as using a serial port on your computer. You simply need to place it on the RT OS and run it from there.

 

You can add a cRIO to your project through the project explorer window by right clicking on the project at the top level. From here you can select New »  Add targets and devices.

 

From here you can expand compactRIO and select the device you have connected. Alternatively you can specify the IP address of the device. Once selected you choose if you want to use the FPGA or Scan mode inteface.

 

Finally, you can add a VI under your cRIO which allows you to use the serial port on the cRIO. A good example of that was the communication between RIO and host example I sent you previously.

 

Hopefully this helps answer your question, please do let me know if you want me to clarify this further.

 

Regards,

Aaron. E
Product Performance Engineer
Dyson
0 Kudos
Message 5 of 6
(5,046 Views)

Aaron

 

Sorry for the late reply. I did what you told and it worked quite well. It was quite fairly easy. Another problem is one of my coursemates is programming the FPGA part on a cRIO, and I wonder if there are confilcts between my part under scan mode and his under FPGA

0 Kudos
Message 6 of 6
(5,005 Views)