02-15-2012 10:56 AM
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!
02-16-2012 05:59 AM
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,
02-17-2012 01:58 PM
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!
02-21-2012 08:42 AM
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
02-21-2012 09:55 AM
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,
03-01-2012 12:34 PM
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