LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USB data acquisition card in 485 communication?

As shown in following figure, I designed  a measurement system which requires two analog inputs, one analog output and one 485 communication. The main problem is that I think USB data acquisition card can be applied to 485 communication, but I don't know how to start in practice, when VISA cannot be used.
So I want to ask:

1.Is my system feasible?

2. If the system is feasible, where can I get the LabVIEW routine for the bottom layer of 485 communication protocol?

3. How difficult is it to achieve? (for LabVIEW newcomers, I can use LabVIEW components smoothly, but  I have not systematically learned rs485 communication knowledge).

DK_Zero_0-1648179246249.png

 

0 Kudos
Message 1 of 5
(1,146 Views)

@DK_Zero wrote:

As shown in following figure, I designed  a measurement system which requires two analog inputs, one analog output and one 485 communication. The main problem is that I think USB data acquisition card can be applied to 485 communication, but I don't know how to start in practice, when VISA cannot be used.
So I want to ask:

1.Is my system feasible?

2. If the system is feasible, where can I get the LabVIEW routine for the bottom layer of 485 communication protocol?

3. How difficult is it to achieve? (for LabVIEW newcomers, I can use LabVIEW components smoothly, but  I have not systematically learned rs485 communication knowledge).

DK_Zero_0-1648179246249.png

 


Hmm... Sounds like you are going to have to Bit Bang the serial communications out of a DIO port. That's old school!

 

Also most Modbus serial is RS-485 so you might still need some type of converter chip in the mix.

 

It would be less work to just use a USB to serial (RS-485 or whatever your device requires) converter. Then you can use the NI Modbus library.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(1,139 Views)

thank your response. I considered the usb to 485 serial conveter. But it will bring new problems: there exist two USB ports in the system(one is 485 communication, another is DAQ). I want to avoid problems like this, as well as I don't want to use the MCU like STM32(it's too hard for me). So is there any other way to solve this problem?

0 Kudos
Message 3 of 5
(1,109 Views)

@DK_Zero wrote:

thank your response. I considered the usb to 485 serial conveter. But it will bring new problems: there exist two USB ports in the system(one is 485 communication, another is DAQ). I want to avoid problems like this, as well as I don't want to use the MCU like STM32(it's too hard for me). So is there any other way to solve this problem?


Well honestly, no!

 

You can either invest lots of energy and time in trying to get your RS-485 interface bitbanged through the digital lines of the USB DAQ device (with horrible communication speeds, just to warn you), or you can simply add an FTDI RS-485 to USB converter and be done with it.

 

The alternative is to develop your own MCU based interface card to completely replace the USB DAQ device with your own, but as you said that is beyond what you are willing to bear with.

 

You might also consider a Raspberry Pi or similar MCU instead, which would let you forget about hardware designing your own PCB but it's still going to be a lot of software on the MCU you have to design, and potentially that will not be in LabVIEW.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(1,099 Views)

Thank you, I think I know what to do.

0 Kudos
Message 5 of 5
(1,095 Views)