^17 - The Dry Contact Port
This read only port contains the state of all the dry contact and aux inputs on a device in banks of 8. The value is a bitfield with each contact represented by a single bit.
Syntax
LDA ^17,x
Where x is the bank of dry contacts you want the status of.
LDA ^17,0 will give the state of dry contacts 1-8.
LDA ^17,1 will give the state of dry contacts 9-16.
The aux input of a load controller will be the bit. That means that dry contact 8 on a DDMC802 is actually the 9th value (bit 1 of the second bank). |
Examples
Example 1
Example showing using SHR to interrogate one dry contact at a time.
Task1()
{
Name="Occupancy Trigger" //Checks the state of dry contact 3.
LDA ^17,0 //Get the dry contact port
SHR //Move dry contact 1 into the carry flag
SHR //Move dry contact 2 into the carry flag
SHR //Move dry contact 3 into the carry flag
BRC Occupancy //If carry flag is set sensor saw motion
...
}