[PLC] # # matplc.conf - configuration file # confmap_key=100 # the speed of the light-chasing (interval in seconds) Chaser: delay = 0.3 [PLC] point L "light" Chaser 4 point_alias L1 "light 1" L 0 point_alias L2 "light 2" L 1 point_alias L3 "light 3" L 2 point_alias L4 "light 4" L 3 point left "<- (key L)" Kbd point right "-> (key R)" Kbd point quit "quit (key Q)" Kbd point mbtest "Modbus test point" modbus_s 32 # run the modules!!! # # Note: the Kbd module cannot run as a deamon, as it reads the # terminal's keyboard. It is therefore launched in the demo script. #module Kbd ../basic/kbd module Chaser "../basic/chaser" #module vitrine "../../mmi/curses/vitrine" module plcshutdown "../../lib/util/plcshutdown" # Uncomment the modbus protocol version you wish to run... #module modbus_m "../../io/modbus/modbus_m_rtu" #module modbus_m "../../io/modbus/modbus_m_asc" module modbus_s "../../io/modbus/modbus_s_tcp" *include vitrine.conf [PLC] # synch the modules synch Chaser -> modbus_s #synch Chaser -> vitrine synch Chaser -> Chaser synch_start Chaser Chaser: scan_period = 1.0 [plcshutdown] # configure which point will be used to shutdown the plc quit_pt = quit scan_period = 0.01 [modbus_s] # Endpoint configuration table # # endpoint # # : the name of the network. Not used # : {rtu | ascii | tcp} # # For rtu and ascii networks... # : [device ] # [baudrate ] # [parity {even|odd|none}] # [data_bits ] # [stop_bits ] # [ignore_echo {true|false}] # [timeout ] # [send_retries ] # # For tcp networks... # : [host ] # [port ] # [address ] # [connections ] # [mode 0|1] # host : the IP address or DNS name of the interface to listen on # 0.0.0.0 stands for INADDR_ANY # port : x is either the port number on which the server is listening, # or the service name, which will be mapped onto the port number # according the configuration in the /etc/services file # connections : The number of simultaneous incoming connections to accept # mode 0|1 : The mode in which the slave is run: 0 - async, 1 - sync # The default value is 0 # Sample endpoint configurations... #network rtu_net rtu device /dev/ttyS1 baudrate 9600 parity none data_bits 8 stop_bits 1 ignore_echo false timeout 1.5 send_retries 2 #network asc_net ascii device /dev/ttyS1 baudrate 9600 parity none data_bits 8 stop_bits 1 ignore_echo false timeout 1.5 send_retries 2 endpoint tcp_net tcp host 192.168.1.232 port 5502 address 34 mode 0 connections 1 # Sample IO table # # map slave # instead of the number of bits one may use "high" for 16 and "low" for 0 map slave 0 L map slave 5 L map slave low L map slave high L map slave 0 mbtest map slave 16 mbtest