About to release my PLCBUS code, but have some lose ends that I want to fix/understand.
If I query the interface for noise and signal levels, I only get 00 00 back.
Anyone knows why?
I sent: 1A REPORT SIGNAL STRENGTH* Report the Signal Strength.
2010/08/17 10:34:16 [PLCBUS] > 02 05 FA 00 1A 00 00 03
2010/08/17 10:34:17 [PLCBUS] > 02 05 FA 00 1A 00 00 03
I get 00 00
2010/08/17 10:34:17 [PLCBUS] < 02 06 FA 00 1A 00 00 1E 03
I sent: 1B REPORT NOISE STRENGTH* Report the Noise Strength.
2010/08/17 10:34:31 [PLCBUS] > 02 05 FA 00 1B 00 00 03
2010/08/17 10:34:31 [PLCBUS] > 02 05 FA 00 1B 00 00 03
I get 00 00
2010/08/17 10:34:32 [PLCBUS] < 02 06 FA 00 1B 00 00 1E 03
Status poll works ok.
I sent status poll: 1D GET ONLY ON ID PULSE
2010/08/17 10:34:36 [PLCBUS] > 02 05 FA 00 1D 00 00 03
2010/08/17 10:34:36 [PLCBUS] > 02 05 FA 00 1D 00 00 03
I get: correct answer (A3 is ON)
2010/08/17 10:34:37 [PLCBUS] < 02 06 FA 00 1D 00 00 1E 03
2010/08/17 10:34:37 [PLCBUS] < 02 06 FA 00 1D 00 04 40 03 Addr: A01 Cmd: GET_ONLY_ON_ID_PULSE Data1: 00 Data2: 04 GET ONLY ON ID PULSE UNITS ON: 00000000 00000100
Same if I set ACK (3A / 3B)
Or should I use these instead and query all device codes separately?
18 GET SIGNAL STRENGTH # Check the Signal Strength.
19 GET NOISE STRENGTH # Check the Noise Strength.
PLCBUS 1141 API question
Moderator: Digit
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
PLCBUS 1141 API question
Regards, Ron.
Re: PLCBUS 1141 API question
Hi Ron,
You have to send the GET_SIGNAL to each module, here's how i construct the data part of the packet to send it to each module in a loop (which i left out here):
As you can see i also use the ACK bit.
That should give better results.
You have to send the GET_SIGNAL to each module, here's how i construct the data part of the packet to send it to each module in a loop (which i left out here):
Code: Select all
Addr := KnownDevice[SigNoiseReqIndex];
// get house and unit code out of address
HC:=ord(Addr[3]);
val(copy(Addr,4,2),UC, ErrCode);
Log('Queueing GET_SIGNAL for '+Addr);
Data:=chr( (HC-ord('A')) shl 4 + (UC-1) )+chr(PLCBUS_GET_SIGNAL or PLCBUS_ACK_BIT)+chr(0)+chr(0);
AddToCommandQueue(Data);
That should give better results.