Execute Batch Program
Instruction Parameters
Supported PLC Series
| XPnA/1R | XPnB | XPnE | XPnF | CP3A/B/P/U CP4A~D/U | CPnE | CPnF | BP | PLC-S |
|---|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | - |
Supported Load Cell Modules
| Module | Channels |
|---|---|
| CM1-WG02C | 2 Channels |
| CM1-WG02D | 2 Channels |
| CM1-WG02E | 2 Channels |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Base/Slot | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | - | ✓ | ✓ | ✓ | ✓ |
| S | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | - | - | ✓ | - | ✓ | ✓ | ✓ | ✓ |
| D | ✓ | - | ✓ | ✓ | ✓ | - | - | - | - | ✓ | - | ✓ | ✓ | ✓ | - |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | - |
| Carry | F11.2 | - |
Number of Steps
| Steps |
|---|
| 4 |
Operands
| Operand | Description |
|---|---|
| Base/Slot | The first operand. Entries are Hexadecimal data registers or constants. This is the base and slot number where the load cell is located. This location depends on the amount of expansion modules the chassis contains. |
| S | The second operand. Entries are WORD data registers or constants. This is the channel number where the embedded batch program is located. The value range is 1 ~ 4. |
| D | The third operand. Entries are only WORD data registers. This is where the result of the batch program execution is stored. |
Assignment Example
The following example shows how to assign values to Base/Slot.
Base/Slot (CM1)
| Base Number | Slot Number | |
|---|---|---|
| H | 0A | 0B |
| Hexadecimal | 2 Digits in Hexadecimal | 2 Digits in Hexadecimal |
| Base Number | Slot | Example |
|---|---|---|
| Local Base | Slot Number 5 | H0005 or 5 |
| 1st Expansion | Slot Number 3 | H0103 |
| 10th Expansion | Slot Number 7 | H0A07 |
| 14th Expansion | Slot Number 12 | H0E0C |
| 16th Expansion | Slot Number 10 | H100A |
IMPORTANT: Base Number and Slot Number have specific parameters:
- Base Number and Slot Number could be different according to the PLC CPU and base type.
- Base Number:
- Local base: H00
- Expansion range: H01 ~ H10
- Slot Number:
- Range: H00 ~ H0B
D Data Register Result
| Result Type | Bits | Description |
|---|---|---|
| Error Code | H00 | No error |
| Error Code | H01 | Base/Slot invalid |
| Error Code | H10 | Module busy |
| Operation Status | Bit 0 | 1 when the instruction executes |
| Operation Status | Bit 1 | 1 when instruction execution finishes |
| Operation Status | Bit 2 | 1 when an error occurs Simultaneously sets with Bit 1 |
| Operation Status | Bit 3 ~ 7 | Reserved |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.