How do you program a running light based on the TIA Portal?
For testing and commissioning a machine / plant or for demonstration purposes it is sometimes necessary to output defined signal sequences. This entry includes a function block for the S7-1200 and S7-1500 in STEP 7 (TIA Portal), with which different bit patterns (flashing / running lights) can be generated.
You can set different modes:
- Bit pattern (running lights) with only one bit active
- Bit pattern (running lights) with which the number of active bits increases/decreases
- Output of freely defined bit patterns
- Output of a preset bit pattern as flashing light
You can vary the format for which the bit pattern is to be applied. BYTE, WORD or DWORD are possible.
You parameterize the cycle of the flashing / running lights as a parameter on the FB.
The table below describes how to set the parameters of the FB (Runlight [FB1]).
The time set must be greater than the OB1 cycle time. This is the requirement for the timer to run and thus let the FB work properly.
|Input||iS5T_flash_time_base||Time||Cycle for the flashing / running of the bit pattern|
|Input||iDW_ext_pattern||DWord||individual, external bit pattern|
|Input||iIn_mode||UInt||Operating mode [1...10], see description below|
|Input||iIn_data_type||UInt||Data type [1...3], see description below|
|Output||oDW_lights_DWORD||DWord||Output interface format is DWord|
|Output||oWo_lights_WORD||Word||Output interface format is Word|
|Output||oBy_lights_BYTE||Byte||Output interface format is Byte|
|Operating mode Description||Diagram|
|Mode 1 |
Running light 1 bit from left to right
|Mode 2 |
Running light 1 bit from right to left
|Mode 3 |
Running light 1 bit bidirectional starting on left
|Mode 4 |
Running light 1 bit bidirectional starting on right
|Mode 5 |
Running light increasing/decreasing starting on left
|Mode 6 |
Running light increasing/decreasing starting on right
|Mode 7 |
Running light individual pattern from left to right
|Mode 8 |
Running light individual pattern from right to left
|Mode 9 |
Running individual pattern bidirectional starting on left
|Mode 10 |
Flashing light individual pattern
The downloads include a STEP 7 (TIA Portal) library for the S7-1200 and S7-1500 controllers. Download the TIA Portal library provided here into a separate directory and unpack it there. For the utilization of TIA Portal libraries refer also to the FAQ response in Entry id: 107147393.
- Library for TIA Portal V13 SP1 (1,4 MB)
- Library for TIA Portal V15 (273,9 KB) for TIA Portal V15 or higher.
The screens and download in this FAQ response were created with STEP 7 (TIA Portal) V13 SP1 / V15.
Shift, Rotate, SHR, SHL, ROR, ROL, Upgrade global libraries, Demo program
- 想要为一个或多个产品创建 CAx 数据
- 想要向我们发送有关此 文档 的反馈