On 07/12/2018 17.55, Paul Groves wrote:
On 06/12/2018 23:46, Bengt Gördén wrote:
On 2018-12-06 22:27, Paul Groves wrote:
On 06/12/2018 20:28, Dave Howorth wrote:
In connection with switch contacts NC means 'Normally Closed', and for the other sort of contact NO means normally open.
So I'd guess you're supposed to substitute some value there to indicate whether you want the switch to open or close. But you'll need some more documentation to tell you the correct values, or a lucky guess:)
Maybe 0x00 and 0x01 ? or 0x00 and 0xFF ? Who knows!
I don't think it is related to normally closed or normally open as those commands have values already and as I said before all the commands work fine but I am just presented with the error for commands containing NC, even though they all work.
Probably because you're already sending 0x00 in the third byte.
If you run your script (without > USB) and pipe the output to hexdump -C you'll see the result.
$ source yourscript | hexdump -C ./yourscript: line 4: printf: 0xNC: invalid hex number 00000000 f0 a0 00 54 |...T| 00000004
I checked and as you explained it has converted NC to 00
I will try sending 00 instead of NC and see if it still works.
I have not had to deal with hex files before. Can you please explain to me what the 00000000: on the beginning of the data and the ...T on the end mean?
The first column is the index, or the counter. The second column are the values sent. The third column is the equivalent in text of the values. See "man ascii", then search for 54. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)