Uploaded by Jia Yi

EG3958 Experiment 1 PCWay and handling of floating point number v2

advertisement
School of Engineering
Course:
Diploma in Electrical Engineering with Eco-Design
Course Code:
EGDF16
Module:
Intelligent Building Systems
Module Code:
EG3958
Experiment 1
PCWay and handling of Floating point number
Objectives:
 Learn how to interface PCWay to PLC
 Learn to handle floating point number.
EG3958Intelligent Enterprise Systems
Experiment 1
Introduction
PCWay is a simple software that allows user to design user interface on MSExcel and interface with
the PLC.
PCWAY Features
Easy setting data on Excel
By setting the necessary items at the (Cell Settings) dialog box, it is possible to READ or
WRITE the PLC data.
Data storage /printing in automatic operation
Register the data at periodical or non-periodical, in accordance to the relay or PCWAY event
turning to ON. Save the data with the TEXT format. The file format can be registered flexibily.
Also, the data can be written-in and processed at a different application, other than the Excel
one.
Versatility

(Automatic Macro Startup): Starts the registered macro (registered by the User) by the
event turning to ON.

(Sound File): The sound will be out-putted by the PLC relay and event turning ON.

Remote data management via modem
(Modem Support): Connects with the PLCs located in distant regions with the public phone
line.
Interactive data exchange (PLC – PC)
Possible to download the displayed data to the PLC.
Page 2
EG3958Intelligent Enterprise Systems
Experiment 1
Easy operational environment
For those who do not want to use the macro programme...

(Character Change): Changes the display character/colour by the ON/OFF of the relay.

(Operation Formula): perform an operation during the displaying and the operation of the
register.
Procedure:
Design a simple PCWay program to :a) Read the input status of PLC
b) Turn on/off outputs of PLC
1) Write the following program in the PLC. Convert and download the
program to the PLC.
2) We are going to use PCWay to turn on/off R10 of the PLC.
3) Launch Microsoft Excel. Click on Add-ins. The following menu should be
seen.
Page 3
EG3958Intelligent Enterprise Systems
Experiment 1
4) Choose any cell which you want to use it to control R10 of the PLC. Double
click and you should see the following window:
5) Make the following selection on the window:
Page 4
EG3958Intelligent Enterprise Systems
Experiment 1
6) Type a label on the cell that you have configured so that user will know
that cell is a button.
7) Now we are ready to run the PCWay. To do so, click Run PCWay follow by
Start
8) Double click the ‘Button’ and you will be prompted to Change the On/Off
state of the relay. Click OK and you will see Y0 of the PLC turn On.
9) Discovery time! Write down the function of the different Operation
Method under Write only Attribute:
a) Level Operation
b) Pulse Operation
c) On Operation
d) Off Operation
10) Now we will proceed to learn how to read the status of the PLC inputs.
11) Choose a cell where you want to display the status of the PLC input. Double
click the cell to display the settings as shown:The selection shown indicates that
we are interested in reading the
status of X1.
You can choose the text of the On
and Off status using the Character
Change option.
Page 5
EG3958Intelligent Enterprise Systems
Experiment 1
Floating point operation
1) Floating point division can be accomplished by using DIV
SF: Single Precision Real data
SF3.2 : 3.2 is the denominator of the division. The type (SF) must tally with
the numerator, in this case DT300.
If DT300 is an integer, it needs to be converted to a SF data using the
following method:
Let’s experiment by using PCWay.
2) Select a cell in the Excel file where a number is to be entered.
3) Double click the cell and enter the following:
Page 6
EG3958Intelligent Enterprise Systems
Experiment 1
Click OK upon completion.
4) Write a program to divide the content of DT300 by 6.7. The results of
the division should be stored in DT200.
Convert and upload the program to the PLC.
5) Run PCWay and enter a number into the cell. Verify the result is
correctly displayed in DT200.
6) Add in a cell in the Excel spreadsheet to display the content of DT200.
Page 7
Download