Translation Trolley to VIN

From PlcWiki

Jump to: navigation, search

This feature enables an automatic reading or scanning of the trolley number with a following translation to a VIN (Product ID). Two basic steps there are needed:

  • Marriage of the trolley number with the VIN

It is implemented on a workstation most often on the beginning of an assembly line.

  • Translation device Trolley to VIN

It is installed on any station where the conversion is needed.

Marriage of the trolley number with the VIN

Translation device Trolley to VIN

workplace.devicehub.scanhub = yes
workplace.devicehub.scanhub.low_level.device.scan = yes
workplace.devicehub.scanhub.low_level.device.scan.settings.tty = /dev/ttyS0
workplace.devicehub.scanhub.low_level.device.scan.settings.type = serial
workplace.devicehub.scanhub.low_level.device.scan.settings.speed = 9600
workplace.devicehub.scanhub.low_level.device.scan.settings.data_bits = 8
workplace.devicehub.scanhub.low_level.device.scan.settings.parity = N
workplace.devicehub.scanhub.low_level.device.scan.settings.stop_bits = 1
workplace.devicehub.scanhub.low_level.device.scan.settings.no_delim = yes
workplace.devicehub.scanhub.low_level.device.scan.settings.sentence_timeout = 100
#workplace.devicehub.scanhub.low_level.device.scan.settings.sentence_delim = 13
#workplace.devicehub.scanhub.low_level.device.scan.settings.ignore_delim = yes
workplace.devicehub.scanhub.low_level.device.scan.settings.log_file = /usr/local/plc/log/scan.log
workplace.devicehub.scanhub.low_level.device.scan.settings.debug_mode = yes

workplace.devicehub.scanhub.low_level.device.scan.hub_rule.1 = .*
workplace.devicehub.scanhub.low_level.device.scan.hub_rule.1.redir_to = all
workplace.devicehub.scanhub.low_level.device.scan.hub_rule.1.transform = \\
variable buf = "";\\
variable in = popen("/usr/local/plc/bin/plc_trolley2vin_once -e -t -p -m 'PLCMSGTrolley #trolley# not found' '" + input() + "' RAM", "r");\\
() = fgets(&buf, in);\\
() = pclose(in);\\
set_input(buf);

workplace.devicehub.scanhub.high_level.device.scanner = yes
workplace.devicehub.scanhub.high_level.device.scanner.settings.debug_mode = yes
workplace.devicehub.scanhub.high_level.device.scanner.event.scannerinput = .*
workplace.devicehub.scanhub.high_level.device.scanner.event.scannerinput.input = [[:]]
Personal tools