You are on page 1of 21

Paradym-31 Getting Started

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

File structure of Paradym-31 ( Hierarchy )

Now you can follow the steps to create your Project, Resource and Program:

Step1: [File] [New] [Project]


Step2 : Type the name of your Project and select the location to create it

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 )

Step4: Select Com port of DOS PC ( ADAM-5510 ) to communicate with P-31

Step5 : Select proper Com port of the computer with P-31

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

Step6: Type the name of your Program


Step7: Creating a file is successful and youll enter the developing environment

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.

SFC ( Sequential Function Charts ) :


SFC is a graphical language using simple graphical objects to diagram any
sequential process. It provides a clear graphical representation of the process state
machine.

Tasks you want to do in the step


Step

Conditions, flow control

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

FBD ( Function Block Diagrams ) :


FBD is also a graphical programming language and allows you to simply create
and edit complex programs using a powerful set of tools.

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.

Step1: Draw the script of your system with LD


According to your application, you can decide how many inputs and outputs
you want to use, and define the relationship between them in advance. After
that, use some build-in icons from toolbox to implement your application.

Step2: Add and define variables


A P-31 variable is the tag used by various execution elements of the program.
That is to say, you can define variables to represent physical I/O or internal
data, and use these variables to assign each element of your program. Actually,
there are several types of variables, including
Project variables Available to all elements in this Project
Resource variables Available to all elements in this Resource
Program variables Available to all elements in this Program
The relationship between them is shown as below:

Project variable

Resource variable

Program
variable
Please click the proper variable icon from top toolbar to add some variables

Project variable Resource variable Program variable

After that, youll see the following figure

Please click [Add] button to add variables and the folllowing dialog box is
appeared.

Dont forget variables can be represented as internal data or physical I/O. If


you want to add an internal variable, just fill out items of Name and Type. But
for physical I/O, you should select Input or Output button, then youll see IO
Driver, With IO Size of and IO Physical Address are active. So you can
accord to your request to select the relative IO driver and IO size to define
your physical I/O variable. Please refer to the below remarks to set IO
Physical Address.

M Remark: The following list shows the I/O drivers of ADAM-5510:


I/O Module I/O Type I/O Driver Name Bits/Channels
DIP Switch Digital Input ADAMDIP 8
ADAM5017 Analoge Input ADAM501718 8
ADAM5018 Analoge Input ADAM501718 7
ADAM5024 Analoge Output ADAM5024 4
ADAM5050 Digital In/Out ADAM5050 16
ADAM5051 Digital Input ADAM5051 16
ADAM5052 Digital Input ADAM5052 8
ADAM5056 Digital Output ADAM5056 16
ADAM5060 Relay Output ADAM5060 6
ADAM5068 Relay Output ADAM5068 8

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.

Actually, we have a plan to improve the accurate problem of timer


under ADAM-5510, the unit of Timer FBD with ADAM-5510 will be
between 1 and 10 ms instead of 54.5 ms. Well inform you when it is
finished.
4. Complier & Simulation
Although you design your strategy with graphical tool languages like LD, you
can use some compilers to convert these graphical diagrams to files with C code
under P-31. P-31 version 4.0 supports Borland C++ ( version 3.1 and 4.0 ), Turbo
C++ and Microsoft Visual C++ version 4.0 compilers, what kind of compiler you

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.

Step1: Execute Simulation Function ( [Simulation] [Build All and Run] )


Step2: Check the status of compiler

Step3: Change values of variables to check your control logic

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.

Step4: Close simulation function ( [File] [Close] [Simulation] )


5. Download a program into ADAM-5510
P-31 converts your control logic program into a binary executable program.
This program is in the form of a DOS .EXE, you must download this program to
your target resource before you can run it.

Step1: Connection between Host PC and ADAM-5510 ( Null Modem Cable )


The pin assignment of RS-232 is shown as follows:
DB-9 DB-25 Symbol Description
1 8 DCD Carrier Detect
2 2 * RX Receive Data
3 3 * TX Transmit Data
4 20 DTR Data Terminal Ready
5 7 * GND Ground
6 6 DSR Data Send Ready
7 4 RTS Request to Send
8 5 CTS Clear to Send
9 22 RI Ring Indicator

Only three connections needed: RX, TX, GND. Please refer to the below
figure to complete your connections:

Paradym-31 ( Host PC ) DOS_PC ( ADAM-5510 )


TX ================= RX
RX ================= TX
GND ================= GND

Step2: Execute Download Function ( [Execution] [Build All and Run] )

Compiler & Download & Run Download & Run

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.

Status of Compiler Downloading file Finish

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.

Enable Monitor Switch Monitor status Run Program Stop Program

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.

You might also like