Hi all,
I am pretty new to the CAI WebControl Board though I have been following this forum for a long while.
One of my goals that I am working on is to use the board to connect 8 standard magnetic contact door sensors to the 8 digital inputs. These sensors are what’s called “closed loop” which means that when the door is closed and the sensor is in contact with the magnet the circuit is closed. Then have the board update via WEBSET a corresponding variable on my ISY-994 each time the sensor status changes.
I am very far from being an experienced electronic tinkerer. As far as I understand, the way to do this is to connect one end of each of the sensor wires to pin 13 (5Vdc) and connect the other end of each sensor wire to pins 5 thru 12.
I am not going to bore you with all the troubleshooting steps I took to understand what’s going on. To make a long story short here is where I am up to now:
My PLC code now is as follows:
START
TSTEQ IP1 0
CALLSUB IP1_OFF
TSTEQ IP1 1
CALLSUB IP1_ON
END
IP1_ON:
ADD 1 VAR5 VAR5
RET
IP1_OFF:
ADD 1 VAR6 VAR6
RET
So the system will constantly keep adding 1 to VAR5 when Input1 is on, and will keep adding 1 to VAR6 when input1 is off. So this way I can see what’s going on. I also have the Web Polling Enabled option on.
Now here is what happens, when I connect a Dupont wire from pin 13 (5V) to pin 5 (IP1) the system status will properly show IP1 as 1, and VAR5 will keep increasing, and everything is fine. However, when I disconnect the wire from pin 13 while leaving it connected to pin 5, for as long as I am holding the wire in my hand, VAR5 will continue to increase at a rate of about 1-3 per second, while the IP1 status will correctly show as 0 most of the time with once in a while showing 1 & changing right back to 0. But even more strange, when I connect 1 side of the about 15 ft. long 22AWG cable going to a magnetic contact sensor to pin 5, the board goes completely crazy and VAR5 starts increasing at a rate of about 30 per second!
Just to rule out anything else I don’t have anything else connected to the board now other than the power supply & Ethernet cable.
What am I doing wrong here?
Thanks in advance.
I am pretty new to the CAI WebControl Board though I have been following this forum for a long while.
One of my goals that I am working on is to use the board to connect 8 standard magnetic contact door sensors to the 8 digital inputs. These sensors are what’s called “closed loop” which means that when the door is closed and the sensor is in contact with the magnet the circuit is closed. Then have the board update via WEBSET a corresponding variable on my ISY-994 each time the sensor status changes.
I am very far from being an experienced electronic tinkerer. As far as I understand, the way to do this is to connect one end of each of the sensor wires to pin 13 (5Vdc) and connect the other end of each sensor wire to pins 5 thru 12.
I am not going to bore you with all the troubleshooting steps I took to understand what’s going on. To make a long story short here is where I am up to now:
My PLC code now is as follows:
START
TSTEQ IP1 0
CALLSUB IP1_OFF
TSTEQ IP1 1
CALLSUB IP1_ON
END
IP1_ON:
ADD 1 VAR5 VAR5
RET
IP1_OFF:
ADD 1 VAR6 VAR6
RET
So the system will constantly keep adding 1 to VAR5 when Input1 is on, and will keep adding 1 to VAR6 when input1 is off. So this way I can see what’s going on. I also have the Web Polling Enabled option on.
Now here is what happens, when I connect a Dupont wire from pin 13 (5V) to pin 5 (IP1) the system status will properly show IP1 as 1, and VAR5 will keep increasing, and everything is fine. However, when I disconnect the wire from pin 13 while leaving it connected to pin 5, for as long as I am holding the wire in my hand, VAR5 will continue to increase at a rate of about 1-3 per second, while the IP1 status will correctly show as 0 most of the time with once in a while showing 1 & changing right back to 0. But even more strange, when I connect 1 side of the about 15 ft. long 22AWG cable going to a magnetic contact sensor to pin 5, the board goes completely crazy and VAR5 starts increasing at a rate of about 30 per second!
Just to rule out anything else I don’t have anything else connected to the board now other than the power supply & Ethernet cable.
What am I doing wrong here?
Thanks in advance.