Sending Modbus Packet Using Nim Sockets

2024-06-28 Thread jbeuter
I got this to work! Here is the working code to send a basic Modbus on/off packet: var socket: Socket = newSocket() socket.connect(ip, port) #Create packet to write coil #OFF packet var packet: array[12, uint8] = [0x00'u8, 0x00, 0x00, 0x00, 0x00, 0x0

Sending Modbus Packet Using Nim Sockets

2024-06-28 Thread jbeuter
Do you have any documentation for how to implement this/nim resources for how to use this? I am pretty new to nim!

Sending Modbus Packet Using Nim Sockets

2024-06-27 Thread jbeuter
The send() for socket accepts a string data type. I cannot get the actual packet to be received as Modbus when converted to a string.

Sending Modbus Packet Using Nim Sockets

2024-06-27 Thread jbeuter
Hello, I am a new nim user (forgive me if this post lacks info). Currently I am trying to create a socket connection and send a custom modbus packet. I am able to do this in C with and build my own packet as a char array and send it. Using the nim documentati