Author Topic: Connect to MODBUS device through USB port  (Read 10010 times)

AANZ

  • Newbie
  • *
  • Posts: 1
    • View Profile
Connect to MODBUS device through USB port
« on: March 24, 2014, 10:04:18 PM »
Hi!

I would like to connect to a MODBUS device and display some parameters.
Is this possible with AdvancedHMI? Am using this for the first time and any pointers / smaple projects would be great

Some details
The external device suports MODBUS
Connects to a PC through a 485<-> 232 converter
COMMS is 19200 baud | 8 data bits | 2 stop bits | parity none


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Connect to MODBUS device through USB port
« Reply #1 on: March 25, 2014, 03:29:44 AM »
The Modbus driver with AdvancedHMI only supports the ModbusTCP protocol, so it will not work over a serial connection.

johwaa

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #2 on: June 10, 2014, 04:28:21 PM »
Modbus ASCII or RTU? The timing constraints of Modbus RTU make it pretty tough to implement, but Modbus ASCII is very straightforward.

But a better way to do it might be to get yourself a Modbus gateway to do the heavy lifting for you. Such as:

http://gridconnect.com/media/documentation/grid_connect/GC_XPORT-MBTCP_DS_001.pdf

dzydrmr

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #3 on: June 11, 2014, 12:07:01 AM »
Has anyone used the gridconnect device with success?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Connect to MODBUS device through USB port
« Reply #4 on: July 12, 2014, 04:31:45 PM »
A new version of 3.63 has been posted that now contains a MobusRTU driver

gomond

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #5 on: July 13, 2014, 08:31:19 PM »
I am using the Procon X modbus gateway (cheapest and most awesome) simple to setup and works first time wit Advanced HMI.

neptun2002

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #6 on: July 15, 2014, 09:47:20 PM »
Dear Archie I just download the 3.63 version and tried to test the new RTU driver but I did not get any respons from the plc so I checked what advancedhmi send over serial port and I found that the code is consist of 10 bytes I usualy send 8 bytes for turning a coil on or off

my question is ther any option to force the driver to send only the 8 byte format. ?

For refrence here is the code I usualy send to plc and do the jobe to turn coil nomber 1 on the node number 100

64 05 00 00 cf 85 00 ff     // turn on
64 05 00 00 00 00 3f c4  // turn off

and her is what I got from advancedhmi

64 05 00 00 00 01 01 01 83 40   //for turn on
64 05 00 00 00 01 01 00 42 80   // for turn off

thank you so much in advanced

« Last Edit: July 16, 2014, 03:18:07 PM by neptun2002 »

neptun2002

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #7 on: July 16, 2014, 03:05:54 PM »
I just tried all possibilities and got these results

-----------------------------------------------------
PLCAdressClick 00001
-----------------------------------------------------------------------------------------------------------------
MomentarySet AdvancedHmi Packet Onclick: 64 05 00 00 00 01 01 01 83 40 ==>PLC no Responce
             AdvancedHmi Packet OnReleas:64 05 00 00 00 01 01 00 42 80 ==>PLC no Responce
-----------------------------------------------------------------------------------------------------------------
MomentaryReset AdvancedHmi Packet Onclick: 64 05 00 00 00 01 01 00 42 80 ==>PLC no Responce
             AdvancedHmi Packet OnReleas:  64 05 00 00 00 01 01 01 83 40 ==>PLC no Responce
-----------------------------------------------------------------------------------------------------------------
SetTrue AdvancedHmi Packet Onclick:  64 05 00 00 00 01 01 01 83 40 ==>PLC no Responce
-----------------------------------------------------------------------------------------------------------------
SetFalse AdvancedHmi Packet Onclick: 64 05 00 00 00 01 01 00 42 80 ==>PLC no Responce
-----------------------------------------------------------------------------------------------------------------
Togele       AdvancedHmi Packet: 64 01 00 00 00 01 F4 3F  ==> PLC Responce: 64 01 01 00 4F 44
-----------------------------------------------------------------------------------------------------------------

I do not know what is wrong with me pleas help me Archie

Thank you so much
 

BW

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #8 on: September 25, 2014, 02:50:01 PM »
I have a Automation Direct Click PLC that I am using the ModbusRTUCom with the port 3 RS485 connection working fine.
I have a USB-RS485 convertor connected to my PLC ( Automation Direct USB-485M ).
The setup software will default this to COM3.
Make sure the PC COM3 settings agree with your ModbusRTUCom setting and the Node address defined in the PLC is correct.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #9 on: November 19, 2014, 11:42:03 AM »
I seen in this thread mentioning Modbus Ascii.  I have a tool that I need to communicate to via USB, Modbus Ascii.  Will the ModbusRTUCom work for this?  I have the commands for the unit.  I just need to know if this will work or do I actually have to have the Modbus addresses such as the 30000, 40000, etc.

Thanks,
Jim

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Connect to MODBUS device through USB port
« Reply #10 on: November 19, 2014, 04:11:26 PM »
The driver only supports ModbusRTU, but not Modbus ASCII

johwaa

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #11 on: November 19, 2014, 07:21:30 PM »
I seen in this thread mentioning Modbus Ascii.  I have a tool that I need to communicate to via USB, Modbus Ascii.  Will the ModbusRTUCom work for this?  I have the commands for the unit.  I just need to know if this will work or do I actually have to have the Modbus addresses such as the 30000, 40000, etc.

Thanks,
Jim

For Modbus ASCII & .Net, I would go with something like this:

http://www.modbustools.com/modbus_wsmbt.asp

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #12 on: November 20, 2014, 01:32:01 PM »
johwaa

Thanks, but I was looking for open source and not have to buy anything.

Jim

johwaa

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Connect to MODBUS device through USB port
« Reply #13 on: January 01, 2015, 08:21:40 PM »
It's not open source, but it will work with AdvancedHMI:

https://sites.google.com/site/shortbusdll/