Kernel configuration
From PlcWiki
Petr.zalabak (Talk | contribs) (→Special events scripts) |
Petr.zalabak (Talk | contribs) |
||
Line 15: | Line 15: | ||
= PartDistribution.cfg = | = PartDistribution.cfg = | ||
+ | This configuration file defines how the part numbers received in the product data are distributed to the operations. | ||
= plan_''project''.cfg = | = plan_''project''.cfg = | ||
+ | This configuration file defines all workplaces and its operations on a main assembly line and preassembly branches. | ||
+ | |||
= Operation data scripts = | = Operation data scripts = | ||
Line 23: | Line 26: | ||
OperationDataScriptsDir = "/usr/local/plc/bin/operation_data_scripts" | OperationDataScriptsDir = "/usr/local/plc/bin/operation_data_scripts" | ||
It is its default value. | It is its default value. | ||
+ | |||
+ | These scripts are most often used for a centralized printing of labels or creating and/or sending of messages or reports. | ||
+ | |||
+ | Following three types of the scripts can be used: | ||
+ | *Operation scripts | ||
+ | *Workplace scripts | ||
+ | *Special events scripts | ||
+ | |||
== Operation scripts == | == Operation scripts == | ||
Line 29: | Line 40: | ||
is needed. | is needed. | ||
The name of the script needs to be same like an operation ID (for example /usr/local/plc/bin/operation_data_scripts/AB3). | The name of the script needs to be same like an operation ID (for example /usr/local/plc/bin/operation_data_scripts/AB3). | ||
+ | |||
+ | The script is executed with following parameters: | ||
+ | #Product ID | ||
+ | #Operation ID | ||
+ | #Operation data | ||
+ | #Result | ||
+ | #Sequence number | ||
+ | |||
+ | |||
== Workplace scripts == | == Workplace scripts == | ||
- | These scripts are executed when the product is completed on the workplace. Nothing is needed to specify in the Client configuration. | + | These scripts are executed when the product is completed on the workplace (when an operation XY0 is OK reported to the Kernel). Nothing is needed to specify in the Client configuration. |
+ | |||
+ | The script is executed with following parameters: | ||
+ | #Product ID | ||
+ | #Operation ID | ||
The name of the script needs to be same like a workplace ID (for example /usr/local/plc/bin/operation_data_scripts/AB). | The name of the script needs to be same like a workplace ID (for example /usr/local/plc/bin/operation_data_scripts/AB). | ||
+ | |||
+ | |||
== Special events scripts == | == Special events scripts == | ||
There are some special scripts, which are executed by following events: | There are some special scripts, which are executed by following events: | ||
Line 65: | Line 91: | ||
|} | |} | ||
+ | The script is executed with following parameters: | ||
+ | #Product ID | ||
+ | |||
+ | == Using of soft links == | ||
If the script has a general feature, it is useful to use just a soft link named like the operation and it can point to the real script. | If the script has a general feature, it is useful to use just a soft link named like the operation and it can point to the real script. |
Revision as of 22:25, 6 February 2014
Contents |
Kernel configuration file
The main configuration of the Kernel process is stored in the file /usr/local/plc/etc/plc_krnl_project.cfg.
Sending of backflush
The backflush data can be created either by the Kernel, or it can be prepared by a PMC data flow when the data are being received.
Kernel data
PMC data
# It is possible to backflush the product using the PMC dataflow. PMC will prepare the datafile # in time when the data are received to Clever system and place it to the defined DirQueue. When # the product assembly is finished, the Kernel crates the flag file and PMC DirQueue sends the # datafile to JIS. #EndAssemPMCFlagDir = /usr/local/plc/var/pmc/backflushdirq # The flag file can be created by a done operation as well. DoneOperationPMCFlagDir.OC2 = /usr/local/plc/var/pmc/backflushdirq
PartDistribution.cfg
This configuration file defines how the part numbers received in the product data are distributed to the operations.
plan_project.cfg
This configuration file defines all workplaces and its operations on a main assembly line and preassembly branches.
Operation data scripts
It is possible to create bash scripts which are executed by special events. The location of these scripts is defined by the Kernel configuration parameter
OperationDataScriptsDir = "/usr/local/plc/bin/operation_data_scripts"
It is its default value.
These scripts are most often used for a centralized printing of labels or creating and/or sending of messages or reports.
Following three types of the scripts can be used:
- Operation scripts
- Workplace scripts
- Special events scripts
Operation scripts
These scripts are executed when the operation sends its data to the kernel. The Client parameter
Operation.name.SendDataToKernel = Yes
is needed. The name of the script needs to be same like an operation ID (for example /usr/local/plc/bin/operation_data_scripts/AB3).
The script is executed with following parameters:
- Product ID
- Operation ID
- Operation data
- Result
- Sequence number
Workplace scripts
These scripts are executed when the product is completed on the workplace (when an operation XY0 is OK reported to the Kernel). Nothing is needed to specify in the Client configuration.
The script is executed with following parameters:
- Product ID
- Operation ID
The name of the script needs to be same like a workplace ID (for example /usr/local/plc/bin/operation_data_scripts/AB).
Special events scripts
There are some special scripts, which are executed by following events:
Event | Name of the script | Note |
---|---|---|
Start of assembly | START_OF_ASSEMBLY | When the product ID is scanned first time on any workplace |
End of assembly | END_OF_ASSEMBLY | When the assembly is finished. It means the product is either:
|
Rework requested | REWORK_REQUESTED | When the code PLCSENDREW was used on any workplace |
Rework finished | REWORK_FINISHED | When the rework procedure was committed on a rework station |
Rework cancelled | REWORK_CANCELLED | When the code PLCRMREW was used on any workplace |
The script is executed with following parameters:
- Product ID
Using of soft links
If the script has a general feature, it is useful to use just a soft link named like the operation and it can point to the real script.