LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

One serial port, two different devices: one transmitting, one receiving

Solved!
Go to solution

One serial port, two different devices: one transmitting, one receiving

Hi All,

 

I have a cDAQ-9135 device which has one RS-232 port that can communicate at a max baud rate of 115 kps. 

 

I need to receive serial data from one device at a baud rate of 9600 bps and transmit that data (concatenated with other data) to a different device at 100 kps. Can I do this with one serial port by connecting the output of the transmitting device to the RX pin and the input of the receiving device to the TX pin? I feel like the difference in baud rates requires two different ports, but I would then have to switch over to a cRIO chassis since the serial port module (NI-9870) are not compatible with the cDAQ chassis. 

 

Any nuggets of wisdom or help would be greatly appreciated.

 

Thank you.  

0 Kudos
Message 1 of 6
(179 Views)

Re: One serial port, two different devices: one transmitting, one receiving

Assuming you need to process all of the data, the 2 baud rates means you need 2 ports.  May you can change the settings of one device to match the other?


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 6
(147 Views)
Highlighted

Re: One serial port, two different devices: one transmitting, one receiving

Easiest solution would be to add a USB to serial adaptor. Should be easy assuming the cDAQ runs windows, maybe you need to check compatibility with LinuxRT if you're using that.

 

0xDEAD

 

 

0 Kudos
Message 3 of 6
(123 Views)

Re: One serial port, two different devices: one transmitting, one receiving


@deceased wrote:

Easiest solution would be to add a USB to serial adaptor. Should be easy assuming the cDAQ runs windows, maybe you need to check compatibility with LinuxRT if you're using that.


Or a (Moxa or NI) TCP\IP to Serial converter. That's supported for sure.

 

Under Windows these devices add 4\8\16 serial ports, if you install the drivers. But if you don't (or can't, on a RT system), you can directly send data to the serial ports over TCP\IP.

 

As long as you didn't use bytes at port (which is mostly evil anyway), usually changing the VISA resource from serial to TCP\IP address and port is sufficient to get it working, after setting up the Moxa.

Message 4 of 6
(115 Views)

Re: One serial port, two different devices: one transmitting, one receiving

Arduino Mega (having 4 UARTs) and a few MAX233 chips would also be a nice easy cheap solution

0 Kudos
Message 5 of 6
(107 Views)
Solution
Accepted by topic author sdol16
02-19-2019 06:29 AM

Re: One serial port, two different devices: one transmitting, one receiving

After discussing with an NI Applications Engineer, we determined that the cDAQ-9135 can receive serial data at 9600 bps into the RS-232 port on the chassis and it can output serial data from the USB port at a rate of 115kps. With a USB to DB-15 connector cable, our system is complete. 

0 Kudos
Message 6 of 6
(65 Views)