Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Modbus communciation

U3 labview

  • Please log in to reply
5 replies to this topic

#1 santhosh

santhosh
  • Members
  • 11 posts

Posted 14 July 2014 - 10:40 PM

Hi.....

 

We are using LabJack U3HV & LabView 7.1.

We need to interface RS485 + MODBUS protocol with this interface.

 

There is a external controller which will send data & receive data with RS485 using MODBUS protocol.

 

Please guide us what additional hardware & software will require to interface this with U3HV & LabView 7.1.

Please give ref circuit & code Examples.

 

Thanks in advance.

 

Thanks & Regards,

Santhosh



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 15 July 2014 - 09:12 AM

First, I recommend not going through the U3 unless you really have to.  It makes more sense to get a USB <=> RS485 adapter and use that rather than the U3.  Go to amazon.com and search "usb rs485" for many options including the following for $35:

 

http://www.amazon.co...words=usb rs485

 

 

If you want to go through the U3, you first need to add differential transceiver circuitry to interface the CMOS/TLL from the U3 to RS485.  Once you have that, you can use the Asynch ability to send & receive packets:

 

http://labjack.com/s...rs-guide/4.3.12

 

https://forums.labja...?showtopic=5440        (U3/U6/UE9 all similar in UART ability)



#3 santhosh

santhosh
  • Members
  • 11 posts

Posted 16 July 2014 - 04:35 AM

Thank you for response....

 

Please suggest about Mod bus



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 16 July 2014 - 01:39 PM

The fact that you are using Modbus has no effect on post #2 above.  First you need to make the RS485 connection via:

 

A:  a USB dongle (preferred),

 

B:  added differential transceiver circuitry to the applicable U3 DIO.

 

 

Your software will have to build the Modbus packets to send and parse the received Modbus packets.  You might find a Modbus RTU library for your software, or if not you can build and parse the packets yourself by looking at documentation from modbus.org and what is provided by your device manufacturer.

 

If you use method A, your software will send/receive the packets using standard COM port calls.  If you use method B, your software will send/receive the packets using the Asynch ability of the U3 as described in Section 4.3.12.



#5 santhosh

santhosh
  • Members
  • 11 posts

Posted 17 July 2014 - 10:21 PM

Thank you For your response....

 

Hello,...

 

I am using the RS485 half duplex IC, In that I have to high and low one pin to write and read...

 

If  i high one pin then i can send the data and if i low that pin i can receive data, for RX and TX i am using FIO4 and FIO5....

 

Please suggest the labview 7.1 vi file...if I High the FIO6 pIn then i have send that data(FIO4) for 125 ms and then automatically FIO6 have low then i ca recvecie the data from FIO5 Pin...

Please suggest How to do with loop ow hsend and rececieve date with FIO6 pin high and low to read and write data with FIO5 and FIO4...



#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 18 July 2014 - 05:57 AM

We don't support hardware control of a half-duplex transceiver, so you will have to control it manually.  You will have to estimate or figure out when the transmit is done so you can call eDO to change the state of FIO6 at that time.  If you know your device has a substantial delay between receive and transmit, this might be possible.  What is the minimum delay between receive and transmit for your device?





Also tagged with one or more of these keywords: U3, labview

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users