Showing results for 
Search instead for 
Did you mean: 

sbRIO-9631 and communicating using RS-232

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 Smiley Sad . 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.

0 Kudos
Message 1 of 11

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.

0 Kudos
Message 2 of 11

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 Smiley Wink, 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.



0 Kudos
Message 3 of 11

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.  

0 Kudos
Message 4 of 11

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. 

0 Kudos
Message 5 of 11

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?

0 Kudos
Message 6 of 11

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). 




0 Kudos
Message 7 of 11

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.

0 Kudos
Message 8 of 11


   You might want to ensure you are in fact sending HEX strings, not character arrays:




Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 11

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 ?

0 Kudos
Message 10 of 11