Professional Documents
Culture Documents
1. Create a file
Before you begin it is important that you must understand the file structure of
Paradym-31. The file structure bases on the hierarchal construction, as you see in
the following diagram, there are three levels of this hierarchy, the highest level is
Project, the next level is Resource, and the last one is Program. You can regard
Project as a directory, Resource is a sub-directory of Project and Program is a file
of Resource. Therefore, a Project may consist of many Resources, each Resource
also can contain many Programs. The below diagram illustrates the relationship
between these three levels.
Project
Resource 1 Resource 2
Program 1 Program 1
Program 2 Program 2
Program 3 Program 3
Now you can follow the steps to create your Project, Resource and Program:
Step3: Type the name of your Resource and select correct target environment
M Remark:
DOS_PC This resource runs on a standard computer with MS-DOS
version 3.1 or higher. P-31 communicates with this computer serially
using the RS-232 serial ports. ( Ex: ADAM-5510 )
WindowRealTimeKernal This resource runs on the same computer as
P-31 with Windows 3.1 for Workgroup or Windows 95. Thus
eliminating the need for setting up a communications protocol since
both P-31 and your programs are running on the same computer.
WinNTRealTimeServer This resource will acts as a virtual machine and
runs on a computer with Windows NT workstation version 4.0. In
order to communicate with WinNTRealTimeServer, P-31 must also be
running on a Windows NT 4.0 workstation. But if P-31 and the
WinNTRealTimeServer are running on separate computers, they will
need to communicate via TCP/IP address over a LAN.
( Please refer to the manual of P-31 to get detailed information )
M Remark: If you choose DOS_PC as resource, you must use serial port to
communicate with each other. So you should set the correct Com
ports in P-31 software package. Keep one more thing in your mind,
the wiring between DOS_PC and P-31 is not pin to pin, that is to
say, you need to exchange some pins as follows:
DOS_PC Paradym-31
TX RX
RX TX
GND GND
M Remark: You can follow the below statements to create, open, close, delete or
backup your Project / Resource / Program.
Create : [File] [New] [Project] / [Resource] / [Program]
Open : [File] [Open] [Project] / [Resource] / [Program]
Close : [File] [Close] [Project] / [Resource] / [Program]
Delete : [File] [Delete] [Project] / [Resource] / [Program]
Backup : [File] [Backup] [Project] / [Resource] / [Program]
2. Select tool language
There are three tool languages in Paradym-31, that includes SFC ( Sequential
Function Charts ), LD ( Ladder Diagram ) and FBD ( Function Block Diagram ).
Before you develop your application, you should select proper tool language.
LD ( Ladder Diagrams ) :
LD is an outgrowth of the Relay Ladder commonly used in the programming of
PLCs. This offers you a visual method of creating Boolean expressions. By
satisfying the elements of the expression power flows through a coil at the output
of a rung. The ladder logic executes from top to bottom and from left to right.
AND
Multi-Output
OR
M Remark: Actually, it is allowed to use these three tool languages at the same
time. In SFC, you can use LD and FBD in the actions, just like the
following figure. Besides, you also can insert any FBD in LD.
3. Develop your program
After selecting proper tool language, you can refer to the following steps to
develop your application. Here we use LD as our tool language.
Project variable
Resource variable
Program
variable
Please click the proper variable icon from top toolbar to add some variables
Please click [Add] button to add variables and the folllowing dialog box is
appeared.
M Remark: Please pay your attention to the item of IO Physical Address. There is a
rule of addressing for your reference, please follow this rule to set the
address of I/O modules in ADAM-5510:
0-3 for AO
Formula Address = S.C S: Slot, 0-3 C: Channel, 0-7 for AI
0-15 for DI/O
Example:
ADAM-5051 is inserted in Slot1 of ADAM-5510, so the address of first
channel ( bit0 ) of ADAM-5051 is 1.0
M Remark: Take care of Type and With IO Size of, the following is for your
reference:
For AI/AO variable: Type INT, With IO Size of Word
For DI/DO variable: Type BOOL With IO Size of Bit
You cant select LONG or REAL type for AI/AO variables because any I/O
driver under P-31 doesnt support these two type, but supported by internal
data variables. Therefore, you should select INT type for AI/AO variable
and well explain how to solve the problem of real value in AI/AO under
P-31 later.
M Remark: In fact, we use amplifier in software to solve the problem of real or
floating. That is to say, we amplify the reading of AI/AO so that we can
convert the value from real type to integer type. The following list shows
the multiple of different input/output range for AI/AO:
For ADAM5017/18: Reading value = Real input value X Multiple
Input Range Multiple
+/- 10 V 1000
+/- 5 V 1000
+/- 2.5 V 10000
+/- 1 V 10000
+/- 500 mV 10
+/- 150 mV 100
+/- 100 mV 100
+/- 50 mV 100
+/- 15 mV 1000
+/- 20 mA 1000
Temperature ( TC ) 10
For ADAM5024: Real output value = Setting value / Multiple
Output Range Multiple
0-20 mA 1000
4-20 mA 1000
0-10 V 1000
After setting the IO physical variables of ADAM-5510, you can quit Add
Program Variable window and check all variables you set are all right or not
from Program Variable list.
So far you complete to add relative program variables, now what you should
do is to assign all elements of your application with these variables. Please
double click the element you want to assign, then Variable window is pop-
up, just select the proper variable.
You can use the same way to assign all elements, then the final result is shown
as follows:
M Remark: Be careful to assign variables of FBD. You should type the name of the
FBD, then focus on certain Symbolic variable ( Symbolic Input or
Symbolic Output ) and type correct and proper variable name, just like
the following figures:
M Remark: If you would like to use Timer Function in ADAM-5510, please note
that 1 tick of ADAM-5510 is about 54.5 ms ( 18.2 Hz ). However, the
unit of some timer FBDs such as TimerPulse, TimerOnDelay,
TimerOffDelay is tick, not ms or sec. So if you want to delay 1 sec
with TimerOnDelay FBD, please set PT as 18 ( 1 sec / 54.5 18 ),
dont set 1 or 1000.
should use depends on your target resource. The following figures will show you
which compilers are supported by each Resource.
P-31 allows you to simulate your control logic program without the need for a
controller or I/O modules. After you complete writing your application program and
before you load to a target resource, Simulation Function can let you to test it for
problems. This is a very powerful tool for testing, debugging and optimizing the
performance of your program.
t
M Remark: You can type New Value for INT variables, then click [Change] button
to implement it. For Bool variables, just click [Change] button. When
you change values of variables, please check the blinking with green
dots to prove your control process is correct.
Only three connections needed: RX, TX, GND. Please refer to the below
figure to complete your connections:
When you click [Build All and Run], P-31 compiles your program first, then
the status of compiler window is appeared. If success, just click [OK] button
to download the execution file; otherwise, click [Cancel] to debug it.
M Remark: Before you run download-function under P-31, please make sure the
receiving program ( P31_PC.EXE ) is running in ADAM-5510. It is
very important to do that, if not, ADAM-5510 cant receive the
downloading file or commands from P-31. If you want to terminate
P31_PC.EXE in ADAM-5510, it is ineffective to reset ADAM-5510.
you had better run ADAM5510.EXE and select Terminal mode, just
press the <CTRL> + <X> key to terminate P31_PC.EXE.
M Remark: There are four LED lights on ADAM-5510, that includes PWR, RUN,
COMM and BATT. When you run P31_PC.EXE in ADAM-5510, you
can see the LED of PWR is blinking, that means ADAM-5510 is
waiting for commands from P-31. If you run download function in P-
31, you can see the LEDs of RUN and COMM are blinking by turns.
That means ADAM-5510 is receiving the downloading file from P-31.
Therefore, you can know the status of ADAM-5510 by checking LED
lights.
6. Monitor the status of I/O modules on ADAM-5510
You can verify that the control logic is working properly by inspecting that
status of different logic elements in a monitoring window. Monitor-Function can
allow you to exchange messages between P-31 and your target resource. But please
note that the status of the logic elements displayed on a monitoring window is not
real-time.
M Remark: The flashing green dot on the right side of the Status-Bar indicates that
P-31 is actively communicating with the target resource. If you have more than one
monitor window open at a time, this flashing green dot indicates there are message
to exchange between any one monitoring window and the target resource, not
necessary the current active window. The individual windows title indicates when
the last reply was received.
By the way, P-31 also supports On-Line Constant Changes function. That
is to say, P-31 allows you to change all of the constants defined in a program while
monitoring this program in either Execution or Simulation mode. All constants
assigned to the Ladder Diagram function blocks input may be modified.
Step1: Double click certain FBD during monitoring
Step2: Select the constant ( not variable ) you want to change and type
new value
M Remark: The change to the constant is made temporarily in the run-time program,
not in the P-31 program. The new constant value is valid while the
program is running in the controller. If for any reason the controllers
program is terminated and re-started, P-31 restores the original constant
values. The user will need to repeat the On-Line constant change
procedure. It is strongly recommended that you update the constant value
in the P-31 program and download it again. This will make the new
constant value permanent.