×
Siemens Industry Online Support
Siemens AG
文档类型 常问问题 文档编号 67637302, 文档发布日期 2013年12月9日
(4)
评估

How do you program a running light based on the TIA Portal?

  • 文档
  • 涉及产品
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.

Description
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]).

Note
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.
 

Declaration 

Name Type Beschreibung 
InputiS5T_flash_time_baseTimeCycle for the flashing / running of the bit pattern
InputiDW_ext_patternDWordindividual, external bit pattern
InputiIn_modeUIntOperating mode [1...10], see description below
InputiIn_data_typeUIntData type [1...3], see description below
OutputoDW_lights_DWORDDWordOutput interface format is DWord
OutputoWo_lights_WORDWordOutput interface format is Word
OutputoBy_lights_BYTEByteOutput interface format is Byte
OutputoBo_ErrBoolGroup error

Table 1

Operating mode  Description Diagram 
Mode 1

Running light 1 bit from left to right

 

Bild 1
 
Mode 2

Running light 1 bit from right to left

 

Bild 2
 
Mode 3

Running light 1 bit bidirectional starting on left

 

Bild 3
 
Mode 4

Running light 1 bit bidirectional starting on right

 

Bild 4
 
Mode 5

Running light increasing/decreasing starting on left

 

Bild 5
 
Mode 6

Running light increasing/decreasing starting on right

 

Bild 6
 
Mode 7

Running light individual pattern from left to right

 

Bild 7
 
Mode 8

Running light individual pattern from right to left

 

Bild 8
 
Mode 9

Running individual pattern bidirectional starting on left

 

Bild 9
 
Mode 10

Flashing light individual pattern

 

Bild 10
 

Table 2

Download
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.

Creation Environment
The screens and download in this FAQ response were created with STEP 7 (TIA Portal) V13 SP1 / V15.

Additional Keywords
Shift, Rotate, SHR, SHL, ROR, ROL, Upgrade global libraries, Demo program


评估文档
无评估
请求和反馈
您想要做什么?
注意:反馈总是与当前的条目/产品相关。您的消息将被转发给我们在线支持团队的技术编辑们。如果我们需要就您的反馈提供答复,您将在几天内收到答复。如果没有其它问题,您将不会收到答复。