Relays port number
yangoua
Posts: 23
in AMX Hardware
please tell me how do we assign the relay port number to device. can we give it every number we want? if i have relays buttons in my solution can we declare it like this:
DEFINE_DEVICE
Relay1 = 5001:8:0
Relays2 = 5002:8:0
does'it exsit a plage number to assignent to relay?
thanks
DEFINE_DEVICE
Relay1 = 5001:8:0
Relays2 = 5002:8:0
does'it exsit a plage number to assignent to relay?
thanks
0
Comments
Portnumbers are defined in the hardware reference guide or in the AMX PI as mentioned in the other thread.
//on a NI 2100 relays are portnumber 4
dvRelays = 5001:4:0
to turn on relay 1 or 2 you just need to put this in your code:
//turn on relay 1 and 2
on[dvRelays,1]
on[dvRelays,2]
//and similar to turn off relay 1 and 2
off[dvRelays,1]
off[dvRelays,2]