Hi all!
controller = CM15
I'm write the code on perl:
#!/usr/bin/perl
use constant AHCMD => "ahcmd";
my ($housecode, $command, $tmp);
$Status = system (AHCMD. " queryplc ". " A1 on");
### Turn on I1 only if it is off ###
if ($Status eq 0) {
print "Lamp is off...\n";
system(AHCMD." sendplc "."A1"." "."on");
}
if lamp is ON, if lamp is OFF the controller return me 0... i.e. $Status == 0
Why?
Thank You.