ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 communication with cDAQ

Hello,

 

I am about to commence a project which will require my LabVIEW application to communicate with an RS232 device.  I am planning on using an Ethernet 4-slot Compact DAQ module, but can't see a way to connect through.

 

Is this possible? Is there a C-Series module I can buy for RS232 comms?

 

Dave 

0 Kudos
Message 1 of 8
(7,498 Views)

Perhaps an NI Engineer would be more suited to answer this question, but I believe the NI 9870 should work for you.  (It is technically for cRIO, but if I recall correctly, the cDAQ uses the same sized modules so they are interchangable.  Please correct me if I am mistaken!)

 

EDIT:

 

Here seems to confirm its only compatible with the cRIO: https://www.ni.com/en/support/documentation/supplemental/08/c-series-module-and-compactdaq-compactri...

 

So perhaps this module is only cRIO exclusive.  Could someone with more experience or NI connections check this for me 😄

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 2 of 8
(7,491 Views)

I don't think that will work.  I believe that module requires a controller (such as the cRIO) with VISA installed on it so it can communicate.  A cDAQ doesn't have a controller.  It is a package of  "dumb" data acquisition modules.  The code for communicating with a cDAQ runs on a PC, and I don't think the VISA drivers on a PC are able to communicate "through" the compact DAQ to a serial module.

 

If this module was able to work with a cDAQ, I'm sure it would mention it somewhere in the specifications or manuals.

Message 3 of 8
(7,476 Views)

So you mention you have a ethernet cDAQ.  Would it then be possible to add an ethernet switch, and a Ethernet to Serial device?  I have never used one but it appears that a quick google search finds lots of modules that can take ethernet from an RJ45 and convert it to RS232 in a DB9.  Here are a few links.

 

http://www.perle.com/products/RS232-to-Ethernet.shtml

http://www.lantronix.com/device-networking/embedded-device-servers/xport.html

http://www.bb-elec.com/Products/Ethernet-Serial-Servers-Gateways/Ethernet-Serial-Device-Servers.aspx

http://www.digi.com/products/faceted?keywords=products/serialservers/

Message 4 of 8
(7,457 Views)

Thanks for all the responses...

 

It's a pity that you can't use the PC RS232 port and then pass the data through to the LabVIEW application, that would have been ideal.  I looked into the serial to ethernet converters, that could be a reasonable cost solution..

 

Thanks

Dave

0 Kudos
Message 5 of 8
(7,435 Views)

Hi Dave,

 

why can't you use the PC's RS232 port - or any cheap USB-2-RS232 thumb?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(7,430 Views)

That would be a good solution GerdW, but I have no idea how to acheive it - I haven't really done a serial communication application before, would someone be able to point me towards a helpful white paper / tutorial / sample code for doing this?

 

--dave

0 Kudos
Message 7 of 8
(7,426 Views)

Hi Dave,

 

start LabVIEW. Go to help menu and start the example finder. Look for those "serial read and write" example VIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(7,424 Views)