01-06-2011 01:45 PM - edited 01-06-2011 01:51 PM
I am currently trying to interface a radio module serially to sbRIO-9631 using RS-232. I have many doubts regarding this and I really don't know where to start . I went through the example given in Help-->Find Examples-->Robotics-->Communication Protocols-->FPGA RS232.lvproj but it is too complicated. Sould we do all of that just to read and write using RS-232? I also went through different tutorials on FPGA programming but am still unclear about how to use RS-232 on sbRIO-9631. I am attempting to performboth read and write operations (not at the same time)between the radio module and the sbRIO-9631 kit.
I am also struck with a question of how to control the radio module's communication using sbRIO-9631. I figured out a way using LABView to communicate between two radio modules. Now can I embed that program in sbRIO-9631?
Can anyone pelase help me in getting a hang of these things so that I can start working on other aspects of this project pretty soon?
FYI the radiomodule i'm using for this project is Wi.232FHSS-25-R development kit,developed by Radiotronix.
Also, how do I access the serial port on sbRIO-9631? In the onboard I/O folder I can only see the Digital and Analog Inputs/Outputs but am not finding anything like J or RS-232.
Solved! Go to Solution.
01-06-2011 01:50 PM
The 9631 actually has a serial port on it with a standard DB-9 connector (right next to the ethernet jack). You can use the port as you would on your computer--the port will show up as a communication port (you have to have console out disabled on the sb-RIO's dip switches).
In terms of deploying your code you have written in LabVIEW, most of the time you can use the same code on sb-RIO.
Let me know if that makes sense or if you want more details / specifics.
01-06-2011 01:50 PM
First of all, you should know that the sbRIO's have one serial port that you can use directly from the Real-Time side. This is easiest; you use the VISA API to talk to the device.
You can also talk to RS-232 devices with a C-series module (the 987x series, as I recall). I believe the latest version of VISA lets you use those the same way as the built-in serial port.
Finally, if you want to do it the hard way , you can use DIO lines connected to a serial transceiver chip. You have to build some circuitry and then use the FPGA RS-232 VIs to control the right signals to make the DIO lines look like an RS-232 port.
Brian
01-06-2011 02:10 PM
Thanks for your prompt replies. I connected my radio module using a serial cabe to sbRIO-9631. I am still unsre of how to start the FPGA vi? I'm not finding a nomelclature to refer to the RS-232 port in the palette.
01-06-2011 02:15 PM
RoboticsME : Thanks for your reply. Do you mean to say that I will find something like COM1,2,3 in the project manager? I'm not finding anything which looks to me like a COM port in the project explorer window. Please do provide some more details so that I can understand your point. I am sorry if I am asking petty questions but I am new to labVIEW and so am still figuring out ways to deal with FPGA programming.
01-06-2011 03:00 PM - edited 01-06-2011 03:03 PM
I think I got your point. using a serial port configure function it's showing RIO0 in the dropdown list and so that refers to sbRIO-9631 right? So in the place of computer I have the robot now. If I want to read some information from the robot say the LED status then I open a FPGA reference from FPGA interface palette. What bitfile should I be using for communicating? is it of if I use the starterkit roaming bit file that comes along with sbRIO-9631? Or should I develop a bitfile of my own. If I should develop a bit file on my own what information should that contain?
01-10-2011 07:13 AM - edited 01-10-2011 07:14 AM
It sounds like you got the idea for using the integrated serial port on the sbRIO. The VI would look something like the following and run in RT on the sbRIO (except the constant in to the configure serial port would not be blank).
To your second question, yes, you can use the bit file that comes with the roaming example. In fact, if you start with the Starter Kit Roaming.lvproj (the example), the main roaming VI is a good starting point for writing your code. The bit file it uses already has has code for the LED. To access that information, use the FPGA "Read/Write Control" method, which is found on the FPGA palette. It is also the same block used in the roaming example in a few places (as shown below).
01-17-2011 09:57 AM
Thanks for your reply. I am unable to communicate with the radio module using a serial cable. In the vi I am able to access the robot and its serial port. But then when I deploy and run the vi the string constant that I am trying to write (ABCDEFG) never reaches the radio module and so it is not being transmitted. I checked the radio modules by connecting to the computer and transmitting messages and noted that radio modules are working fine that way. Please do suggest me a way to troubleshoot the problem.
01-18-2011 03:39 PM
Robot77,
You might want to ensure you are in fact sending HEX strings, not character arrays:
Regards,
12-11-2013 04:19 PM
Hello i have trouble with sBrio-9632 card and i' d like to know how can i use RS232 port?
When I build VI with a COM1, the com between sBRIO(subd9) and a device(RS232) not work and I don't why.
Whereas if i connect my computer to my device it work well.
Please, could you help me ?