Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kcs question
#6
these two commands use for TOGGLE:

13. Toggle state of digital output
Send:RELAY-KEY-255,id,1
Feedback:RELAY-KEY-255,id,1,OK
"id" means: 1-MAX channel number.
change the status of one digital output, such as your output is ON, when send this command , it will be OFF. if your
output is OFF, when send this command , it will be ON.

---------------------------
8. Set ON/OFF/TOGGLE for any multi channel of digital output
RELAY-SET_MULTI-255,
D23,D22,D21,D20,D19,D18,D17,D16,D15,D14,D13,D12,D11,D10,D9,D8,D7,D6,D5,D4,D3,D2,D1,D0
if use KC868-A64 , it have 64 digital output, every byte have 8 bit, every bit mean every digital output state, so KC868-
A64 have 8 bytes. We will use ON/OFF/TOGGLE for these, so total need 8*3=24 bytes.
(D23,D22,D21,D20,D19,D18,D17,D16) use for ON command
(D15,D14,D13,D12,D11,D10,D9,D8) use for OFF command
(D7,D6,D5,D4,D3,D2,D1,D0) use for TOGGLE command
D23,D22,D21,D20,D19,D18,D17,D16,D15,D14,D13,D12,D11,D10,D9,D8,D7,D6,D5,D4,D3,D2,D1,D0
are “decimal” number, every data convert to binary, bit ”1” is effective , bit “0” is ineffective.
For example:
send:RELAY-SET_MULTI-255,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,32
feedback:RELAY-SET_MULTI-255,OK
D16=(128)dec=(10000000)b means: turn ON output-8
D8=(64)dec=(01000000)b means: turn OFF output-7
D0=(32)dec=(00100000)b means: TOGGLE output-6
So send this command, will turn ON output-8,turn OFF output-7, TOGGLE output-6 simultaneously.
Reply


Messages In This Thread
Kcs question - by andrewbenito - 02-14-2024, 09:28 AM
RE: Kcs question - by admin - 02-14-2024, 10:09 AM
RE: Kcs question - by andrewbenito - 02-16-2024, 07:45 AM
RE: Kcs question - by admin - 02-16-2024, 08:28 AM
RE: Kcs question - by andrewbenito - 02-16-2024, 08:05 PM
RE: Kcs question - by admin - 02-16-2024, 11:10 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)