Closed Serhioromano closed 4 years ago
I've managed to read all data I need. Now I start writing. I use this function
bts2, _ := StringToInt64(task.Val) var set uint16 if bts2 == 0 { set = 0x0000 } else { set = 0xFF00 } result, err = m.Client.WriteSingleCoil(i, set) i++ if err != nil { fmt.Println(err) }
But I hav EOF error.
What do I do wrong?
i is 0 and 1 2 in a cycle
i
Looks like WriteSingleRegister acts the same.
My bad. Works now.
I've managed to read all data I need. Now I start writing. I use this function
But I hav EOF error.
What do I do wrong?
i
is 0 and 1 2 in a cycle