Power control - Lighting Design and Implementation

Content Experiments

- experimental content reference to building configuration guide books -

Project Description:

Lighting control system simulation for a layer of a building lighting system is arranged to monitor their condition, including room lighting, hall lighting, normal lighting and corridor lighting, emergency lighting.

Functional requirements:

1, room lighting, room lighting, emergency lighting and corridor lighting fixtures were employed to distinguish between the different glyph shapes.

2, click on the "Lights On" button, all normal lighting open, click on the "Lights Off" button to turn off all normal lighting.

2, the pre-set "morning", "afternoon", "evening" three kinds of lighting scenes, using the control buttons to realize the lighting scene. Under "Morning" mode, the room interior requires open; the "afternoon" mode, turn on the light in the corridor; the "night" mode, all normal lighting fully open.

3, set "fire simulation" button, clicking the illumination system setting button simulated fire, requiring all normal lighting off, emergency lighting start, guidance personnel escape; while the pop-up alarm interface requires to display information fire alarm, fire alarm termination request Close alarm window.

4, using an analog color change lighting dimming control button lighting control hall, to achieve color lighting.

5, requires direct access to the lighting control system login window when the project into operation.

Because no lamps, it is oval in place of

Green ovals represent office, toilet lamp;
purple ovals represent corridor, the lamp power chamber;
lamp large ovals represent conference room, it can change the cursor value, changes color;
red rectangle represents fire emergency lights;
when the lamp is lit yellow ;

Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description

Experimental Procedure

1. Draw window

Lighting control system window

Here Insert Picture Description
Component placement position with reference to Experiment 1
// the line layout of the room is drawn, you can draw a straight grid tool;
the cursor in a standard library - a cursor - Category 2
dark gray background rectangle primitive is a rear, right rectangle - FIG cell location - rear

// can use ctrl + c / ctrl + v to copy and paste buttons ( copy and paste the controls will remain property of the original control )

Fire alarm window

Here Insert Picture Description
Component placement position with reference to Experiment 1
This forms a composite component - Alarm - Alarm Compound

2. Define the I / O device

  • Double-click the "IO Device Configuration"
    Here Insert Picture Description
  • "IO Device" - "power control" - "emulation driver" - "Simulator (Simulation)", right, called the new "the PLC", the address of the device I / O device 1.
    Here Insert Picture Description
    Here Insert Picture Description

3. Establish real-time database configuration

  • In the definition of the database analog I / O points lightcolor, digital I / O points lighton, morning, afternoon, night, fireon
    For details, refer to Experiment 1
    Here Insert Picture Description

4. establishing a data connection

(1), the connection parameter PV Analog I / O points lightcolor to the I / O device "PLC" analog - 0 the constant register input channel region;

(2), the connection parameter PV digital I / O points lighton to the I / O device "PLC" digital quantity - 0 output from the channel state;

(3), connecting digital I / O points to the morning of the PV parameter I / O device "PLC" digital quantity - 1 ch output state;

(4), connecting digital I / O points of the PV parameter afternoon to I / O device "PLC" digital quantity - 2 Channel status output;

(5), connecting the PV parameter digital I / O points night to I / O device "PLC" digital quantity --3 channel status output;

(6), connecting the PV parameter digital I / O points fireon to the I / O device "PLC" in the digital --4 channel status output;

Here Insert Picture Description

Here Insert Picture Description

5. Real-time database configuration parameters of fire alarm

fireon alarm configuration parameters for real-time database point, alarm priority for senior.

Here Insert Picture Description

6 ... create animations connection

Lighting control system window

  • Dimming lights cursor data conference room Binding

Here Insert Picture Description

Because no lamps, it is oval in place of

Green ovals represent office / toilet lamp;
purple ovals represent corridor, the lamp power chamber;
lamp large ovals represent conference room, it can change the cursor value, changes color;
red rectangle represents fire emergency lights;
lights when unified to yellow;

// can use ctrl + c / ctrl + v to copy and paste buttons ( copy and paste the controls will remain property of the original control )

  • Green lamp (except the bathroom): Animation connection - a color change - conditional expression: lighton.PV || morning.PV
    Here Insert Picture Description
  • Green lamp (toilet): Animation connection - a color change - conditional expression: lighton.PV || night.PV
  • Light Purple : animation connection - a color change - conditional expression: lighton.PV || afternoon.PV
  • Large oval light : Animation connected - Miscellaneous - general operation - the operation period to execute the script: this.FColor = lightColor.PV;
  • Red light : Animation Connection - color change - conditional expression: fireon.PV

If you have lamps, its expression, the script is also a principle: the lamp expressions equal to a certain value, this value is 1 when the on and off is zero

  • Turn-button animation connection - the touch-sensitive operation - Left Action - Press the mouse script: lighton.PV = 1;
  • Button lights animation connection - the touch-sensitive operation - Left Action - Press the mouse script:
    lighton.PV = 0;
    morning.PV = 0;
    afternoon.PV = 0;
    night.PV = 0;
  • Morning button animation connection - the touch-sensitive operation - Left Action - Press the mouse script: morning.PV = 1;
  • Afternoon button animation connection - a touch-sensitive operation - Left movement - pressing the mouse script: afternoon.PV = 1;
  • Night button animation connection - the touch-sensitive operation - Left Action - Press the mouse script: night.PV = 1;
  • Fire simulation button animation connection - the touch-sensitive operation - Left Action - Press the mouse script:
    lighton.PV = 0;
    morning.PV = 0;
    afternoon.PV = 0;
    night.PV = 0;
    fireon.PV =. 1;
    Display ("Fire alarm");
  • End fire simulation button animation connection - the touch-sensitive operation - Left Action - Press the mouse script:
    CloseWindowEX ( "fire alarm");
    fireon.PV = 0;

7. Scripting

  • Write "Application ActionScript" and "enter the program" ActionScript

Here Insert Picture Description

Script reads as follows
note! This is the script into the program , the script is not running cycle of execution

fireon.PV=0;
lighton.PV=0;
morning.PV=0;
afternoon.PV=0;
night.PV=0;
display("照明监控系统");

This script means that, after entering the program, all the lights off and open the window lighting control system

Experimental experience

1. method components, properties, and events to deepen the understanding of the preparation of the script has been greatly improved;
2. sometimes can not find a good look, easy to use, easy assembly, the latter to learn to find resources;
3 when programming, have a very clear logic, to learn by analogy, probably just imitating someone else's code at the beginning, but later will come up with some of my stuff!

For details, refer to Experiment 1 , some of the content in that to write, do not write here

More personal learning experience, welcome to exchange, improve test

Released four original articles · won praise 2 · Views 163

Guess you like

Origin blog.csdn.net/qq_43662263/article/details/105129862