Drive plc developer studio – Lenze DDS v2.1 Benutzerhandbuch
Seite 39

Drive PLC Developer Studio
L
37
DDS DE/EN 2.1
Proceed as follows to reduce the number of free spaces in the car park by one every time.
1. Double click in the function plan editor of the organization unit
Counter the variable
bPhotosensor1
, to toggle its Boolean value, i.e. the value FALSE
→TRUE or
TRUE
→FALSE. The variable changed will be inicated in red:
2. Select
Online
➞
➞
➞
➞
Write values, to set all variables changed in the automation system
(highlighted in red) to the new value. The variables changed will no longer be highlighted.
The variable bPhotosensor1 is now displayed in blue since the value is TRUE. The counting
variable ParkingLotsCounter is increased by 1 because of the FALSE
→TRUE change.
Tip!
The variable ParkingLotsCounter can be reduced by processing the steps described before
with bPhotsensor2 instead of bPhotosensor1.
Please observe that the inputs CU/CD of the counter
ParkingLotsCounter (IEC1131 standard function
CTUD
) only react on a change from FALSE to TRUE (0
→1).
Please proceed as follows to set the number of places available in the car park to 0 and check whether
the lights change from green to red and the barrier is closed.
1. Double click in the function plan editor of the organization unit
Counter the variable
ParkingLotsCounter.CV
, to assign a new value.
A dialog box will be opened:
2. Enter the value “10” in the input field
New value and confirm the entry with OK. The variable
changed is highligthed in red.
3. Select
Online
➞
➞
➞
➞
Write values, to set all variables changed in the automation system to the new
value. The variables changed will no longer be highlighted.
The variable bTrafficLightRed is now set to the value TRUE (blue), the variable
bTrafficLightGreen
is set to FALSE, i. e. the program works correctly.
Show/Hide Bookmarks