modb_sendcmd

Sends modbus command to COM port or TCP socket and waits for responce. When sending to COM this function will add 2 crc bytes at the end before sending and take if from the responce before return.

Arguments

  1. COM or TCP socket handle
  2. Vector modbus command
  3. Integer timeout in ms (default 100)

Output

Vector

Examples

modb_sendcmd