parksh Posted April 12, 2011 Posted April 12, 2011 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.
jvanegmond Posted April 12, 2011 Posted April 12, 2011 Liek this: $szData = Binary("0xBB0000") TCPSend($ConnectedSocket, $szData) github.com/jvanegmond
parksh Posted April 12, 2011 Author Posted April 12, 2011 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")?
jvanegmond Posted April 12, 2011 Posted April 12, 2011 Because AutoIt is not Python. You're using the AutoIt function, not the Python function. github.com/jvanegmond
KDV Posted October 27, 2013 Posted October 27, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now