On 07/12/2018 08.54, Radule Šoškić wrote:
On 12/6/18 8:21 PM, Paul Groves wrote:
Hi everyone.
...
Hi,
I don't know what data exactly you have to send to your device. But, from the above listed sequence it's clear that you try to send one invalid hex value (0xNC is not a hex number).
I am guessing that you might want to send NC as two characters in sequence. If so, than you have co represent them in hex:
N ---> 0x4E C ---> 0x43
So, instead of 0xNC you might want to send two bytes:
byte 0x4E byte 0x43
The link he sent has very limited information. It appears to have an USB to RS232 converter, then the rest. The relevant paragraph says: The next step is to send instructions, the command format is as follows. Control command: (hexadecimal transmission, four bytes) 1. F0 A0 00 53 Disconnect command. In JOG control mode, this function is disabled. 2. F0 A0 01 53 Closed command, in different control mode, the effect is different 3. F0 A0 NC 54 Select the control mode as normal control mode 4. F0 A0 NC 55 Select the control mode for jog control 5. F0 A0 NC 56 Select the control mode for delay control 6. F0 TH TL 57 In normal control mode, set the timer time, delay time is between 1 and 65536 seconds. After the delay time arrives, the current state of the relay is inverted. The timing time is TH * 256 + TL. Timing is a one-time, set up only once. When I pose the mouse over the lines get a popup with text in what appears to be Chinese. So maybe what we get is a translation. There should be a link to the actual documentation of the module. As it is, it is incomplete and wrong. Maybe "normal control mode" (NC) has to be replaced with a number from a table of values somewhere. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)