NetCam and NetCam MP and Express6 I/O Connector Example Information www.micronica.com.au ------------------------------------------------------------------- Pinout ------ NETCAM EXPRESS 6 * 1 2 * 1 2 3 4 5 6 7 8 3 4 5 6 7 8 *** 1,2 = relay, 2A @ 28VDC or 0.5A @ 125VAC 100 million operations w/no load, 100,000 loaded 3 = I/O 0 4 = I/O 1 5 = I/O 2 6 = I/O 3 7 = +5V regulated, 50mA dedicated power 8 = Ground Setting Direction of I/O Line(s) -------------------------------- # Set Direction of I/O Line(s) mbus /dev/io w 3,[direction] where "w" means "write command", "3" means "set direction" and "direction" is a value from 0-15 representing the four I/O lines, 1=input 0=output 0 = 0000 = all four lines set to output 1 = 0001 = line 0 is input, lines 1-3 are output 2 = 0010 = line 1 is input, lines 0,2,3 are output 3 = 0011 = lines 0,1 are input, lines 2,3 are output ... 15 = 1111 = all four lines set to input # Example, setting all four I/O lines to input mbus /dev/io w 3,15 Set I/O Lines (on lines configured as output) ---------------------------------------------- # Set I/O mbus /dev/io w 1,[line] where "w" means "write command", "1" means "set I/O" and "line" is a value from 0-15 representing the four I/O lines, 1=set 0=clear # Example, setting line 0 mbus /dev/io w 1,0 Read I/O Lines (on lines configured as input) --------------------------------------------- # Read I/O mbus /dev/io w 2 r 1 where "w" means "write command", "2" means "get I/O", "r" means read byte A one byte value is returned. Only the low 4 bits are valid, each bit representing the I/O lines 0-3 # Example, reading state of lines mbus /dev/io w 2 r 1 If returned value is: 0, all lines are low 1, line 0 is high, rest are low 2, line 1 is high, rest are low 3, lines 0,1 are high, rest are low ... 15, all lines are high Trigger Relay ------------- # Trigger Relay mbus /dev/io w 4,[relay] where "w" means write command, "4" means "set relay" and "relay" is the relay setting, 0=open 1=closed In a typical setup, a closed value (1) would turn on a device such as a lamp (see voltage/current limitations near top of this document). # Example, closing relay mbus /dev/io w 4,1 Full Examples ------------- # --- READ STATE OF I/O LINES --- # First, set all I/O lines to input mbus /dev/io w 3,15 # Read state of I/O lines mbus /dev/io w 2 r 1 # --- SET ALL I/O LINES HIGH --- # First, set all I/O lines to output mbus /dev/io w 3,0 # Set state of all I/O lines to high mbus /dev/io w 1,15 # --- Open Relay --- mbus /dev/io w 4,0 # --- Close Relay --- mbus /dev/io w 4,1