External Program Selection
Bu içerik henüz dilinizde mevcut değil.
A part arrives at the machine with a label on it. Instead of scrolling the program list and reading a number off a traveller, the operator scans the label and the matching program is selected.
Fitting the reader is a configuration change on the machine. No software is written and no new build is deployed.
Declaring the device
Section titled “Declaring the device”The machine’s peripheral configuration file, PeripheralConfig.xml, lists the devices
this machine is fitted with. A machine with none ships it empty and no readers are
started.
<PeripheralConfig> <Device id="barcode1" type="hid_keyboard" vid="0x1EAB" pid="0x8102" terminator="CR" target="program_name" channel="1" enabled="true"/></PeripheralConfig>| Attribute | What to enter |
|---|---|
id | any unique name; it is what logs and faults call this reader |
type | hid_keyboard or serial |
vid pid | hid_keyboard: the USB or Bluetooth ids, in hex, used to find the device |
path | an explicit device node or serial port; used instead of vid/pid when given |
baud | serial only |
terminator | CR, LF or CRLF, whichever ends one reading. serial only; a keyboard-emulating device sends ENTER |
target | what a reading means. program_name selects the program of that name |
channel | which channel the program is selected on |
enabled | false parks the device without deleting the row |
The file ships with one row already written and enabled="false". Fill in the real
vid and pid once the scanner is on the machine, then set it to true.
State a channel on a machine with more than one. The control does not pick one for you,
and a reading that does not name a channel is refused. A single-channel machine may leave
it out.
The two device classes
Section titled “The two device classes”hid_keyboard: the common handheld scanner, USB or Bluetooth, which presents itself as a keyboard and types what it reads.serial: a fixed-mount reader or a scale on a serial port, with each reading ended by theterminatoryou set.
A keyboard-emulating scanner is claimed exclusively while it is open, so a scan cannot also be typed into whatever field has focus. Without that, a barcode lands in the MDI line or in the program editor.
What the barcode has to contain
Section titled “What the barcode has to contain”The reading is the program’s own name, used as it is read. There is no lookup table to keep in step, and a program posted from CAM is selected by a scan exactly like one written on the panel, as long as the label carries the name the program is stored under.
Scanning selects; it does not start
Section titled “Scanning selects; it does not start”A scan loads the program and stops there. Cycle start is still a separate action, and the PLC still decides whether that start is permitted. A label passing in front of a scanner cannot put the machine in motion.
Every scan reports one of these, so a reader that has stopped working never looks like a quiet machine:
| Outcome | Meaning |
|---|---|
| Loaded | matched, and the program is now selected |
| No match | no program carries this identifier: an everyday event, not a fault |
| Unknown target | the target on the device is not one this control handles |
| Ambiguous channel | the machine has several channels and the device named none |
| Load failed | the channel refused: busy, or no interpreter |
Where to go next
Section titled “Where to go next”- Selecting & Loading a Program: selecting by hand on the panel.
- Cycle Programming: authoring a program a scan can then select.