Jump to content

Send the packet


Recommended Posts

Hi?

I like to send a some packet to modbus/tcp device to control it.

I do success in python as follow:

==============================

sdata = struct.pack('BB',0x00,0x00)

sock.send(sdata)

=============================

and it works well;

but now i don't know how to do like this in Autoit.

if anyone knows, Please let me kown.

i try to do like this:

$szData = Binary("0x00,0x00")

TCPSend($ConnectedSocket, $szData)

but this does not work like above python source.

Link to comment
Share on other sites

this is my want to send data

$szData = Binary("0x00,0x00,0x00,0x00,0x00,0x09,0x01,0x10,0x00,0x08,0x00,0x01,0x02,0x00,0x01");

but i can't send it.

why should Binary("0x00,0x00") be change like Binary("0xBB0000")?

Link to comment
Share on other sites

  • 2 years later...

Hi?

I like to send a some packet to modbus/tcp device to control it.

I do success in python as follow:

==============================

sdata = struct.pack('BB',0x00,0x00)

sock.send(sdata)

=============================

and it works well;

but now i don't know how to do like this in Autoit.

if anyone knows, Please let me kown.

i try to do like this:

$szData = Binary("0x00,0x00")

TCPSend($ConnectedSocket, $szData)

but this does not work like above python source.

 

Hi,

I'd like to creat some scripts to automate a module using Modbus TCP/IP.

So I'm looking for the libary for this fucntion. I knew you worked on this long time ago.

Could you share me your script please? Send to me at kduanvo@yahoo.com

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...