Table of Contents

SLC500 / UNITY path general informations

This chapter gives the general informations for SLC500 to UNITY conversion path.

Variables translation schemes

The name and comment of the variables are kept with their initial values. Some variable names may be not supported under destination IDE (i.e. reserved mnemonic, etc.). These variables are renamed by adding a suffix or a prefix to the original mnemonic. If no mnemonic exist in the source code, then a mnemonic is created in the destination code using the address of the variable. i.e. a variable in the data Bx:y/z with no associated mnemonic, is translated in a variable named B_x_y_z whose location depending on the type of data.

O data - Digital and Analog output

The mapping of the digital outputs of the source must be done by the user to define the new location in the new hardware configuration.

The O Data is converted in unlocalized variable of EBOOL or INT type depending on the usage. example :

<note>When setting the location of those variables in the new hardware configuration, be sure to recreate the overlap existing between INT and EBOOL variables. Example: O_0_11_7 should be localized on the bit 7 of the O_0_11 word.</note>

I data - Digital and Analog Input

I Data is translated in unlocalized variables of EBOOL or INT type depending on the usage.

see outputs translation scheme.

S data - System

The S Data are translated in unlocalized variables of EBOOL or INT type depending on the usage.

Example :

<note>The behavior of those system variables are not reproduced in Unity-Pro. Please check the usage of those system variables. Eg: S_24 is used for indexation and its calculation must be reviewed in the destination code.</note>

B data - Boolean

The B Data is translated in variables of BOOL or INT type depending on the usage, and localized in %MW memory plan :
%MW100.0 to %MW999.15

Example:

N data - Integers

The N Data are converted in variables of BOOL or INT type depending on the usage, and localized in %MW memory plan.
%MW1000 to %MW26999

Example:

data file : CS (integer)

%MW27000 to %MW27999

F data - Floats

The F Data is converted in variables of REAL type, and localized in %MW memory plan.
%MW28000 to %MW29299

Example:

A data - ASCII

The A Data is converted in variables of INT type, and localized in %MW memory plan.
%MW30600 to %MW31499

Example:

ST data - Strings

The ST Data is converted in variables of STRING type, and localized in %MW memory plan.
%MW31500 to %MW32300

Example:

T data - Timers

The T data is converted in unlocalized instances of a structure named 'timer' whose structure contains evolution information for the timer as SLC500 does.

Example:

C data - Counters

The C data in converted in unlocalized instances of a structure named 'counter' whose structure contains evolution information for the counter as SLC500 does.

Example:

R data - Control

The SLC500 R data located at Rx:y is converted in Unity-Pro as unlocalized instances, named R_x_y_0, of the UDT named 'control' whose structure contains the information of the corresponding control R data.

Example:

PLC5 address Converted in unlocalized variable
R6:3 R6_3_0
R6:3/15 R6_3_0.EN
R6:3/EN
R6:3.0/EN
R6:3.1 R6_3_0.LEN
R6:3.LEN

D data - Decimal

The D Data are translated in unlocalized variables of INT type and named Dfilex_y for the original Dx:y SLC500 address.

Example:

BT data - Bloc Transfer

The BT Data is converted in unlocalized variables named Btx_y_0 and of 'block_transfers' type whose structure contains the information of the corresponding BTx:y data.

Example:

PLC5 address Converted in unlocalized variable
BT14:1 Bt1_20
BT14:1/EN Bt14_20.R_En
BT14:1/DN Bt14_20.Dn

M0 and M1 data

M0 and M1 data not supported.

MG data - Message

The MG Data is converted in unlocalized variables named Mgx_y and of 'mg' type whose structure contains the information of the corresponding MGx:y data.

Example:

PLC5 address Converted in unlocalized variable
MG14:20 Mg14_20
MG14:20/15 Mg14_20.R_En
MG14:20/EN
MG14:20.0/EN
MG14:20.1 Mg14_20.Len
MG14:20.LEN

PD data - PID

The PD Data is converted in unlocalized variables named Pdx_y and of 'pd' type whose structure contains the information of the corresponding PDx:y data.

Example:

PLC5 address Converted in unlocalized variable
PD15:2 Pd15_2
PD15:2/EN Pd15_2.R_En
PD15:2/PV Pd15_2.Pv

CT data - ControlNet

Not supported.

Codes modules translation schemes

Here are described the way each type of code (Ladder, SFC, System codes, …) is translated to the destination file.

Only one section named Main is created in Unity-Pro. It calls:

  1. the 'Mast_Calculate_System_Data' sub-routine, created to update the SLC500 system variables according to the Unity-Pro system bits/words.
  2. and the 'Mast_Lad2_…' sub-routine, that is the entry point of the program translated from SLC500 application.

<note>In Unity-Pro, each section is executed one after the other and can call some sub-routines which can also call other sub-routines etc… In SLC500, the LAD2 routine is the entry point and can call other LADx routines that can call other LADx routines etc…</note>

The Program files

Each LAD program is translated in Unity ladder SR (subroutine).

The Program file name is kept during the conversion, and it is renamed as “Mast_Ladx_<ProgramName>” where:

Grafcet

There is no grafcet in SLC500.

The Comments of the program

The two kinds of comments are kept :

Note: the rung concept does not exist in Unity-Pro, so each rung of SLC500 is translated in Unity-Pro as instruction(s) whose comment contains at least the rung number.

Example: In the SLC500 LAD3 routine named 'MyName', the Rung 4, whose title is 'my title' and whose description is 'my description', is converted in Unity-Pro in the Mast_Lad3_MyName as instruction(s) whose comment is

Rung: 4: my title
my description

The System functions

Timer

The timer function is converted in an instance named 'T_TON' (or 'T_TOF', 'T_RTO') of a DFB named 'Slc_Ton' (or 'Slc_Tof' or 'Slc_Rto') that reproduces the behavior of the TON (or TOF or RTO) timers of the PLC5. This instance uses the unlocalized variables named 'T_x_y_0' of 'timer' type, that stores the evolution informations of the timer Tx:y from PLC5, to update the status of the corresponding timer.

The instance named 'T_RES' of the DFB named 'Slc_Res_T' is used to reset the timers structures (named 'T_x_y_0' for Tx:y from SLC500).

Counter

The timer function is converted in an instance named 'C_CTU' (or 'C_CTD') of a DFB named 'Slc_Ctu' (or 'Slc_Ctd') that reproduces the behavior of CTU (or CTD) counters of the PLC5. This instance uses the unlocalized variables named 'C_x_y_0' of 'counter' type, that stores the evolution informations of the counter Cx:y from PLC5, to update the status of the corresponding counter.

The instance named 'C_RES' of the DFB named 'Slc_Res_C' is used to reset the counters structures (named 'C_x_y_0' for Cx:y from SLC500).

STI - Selectable Timed Interrupts

The configuration (id of the involved LADx, time interval, …) of STI is not converted to Unity-Pro. However, the ladder code is converted like the other LADx as a sub-routine in Unity-Pro. The usage of the S:2/1 system bit is also converted to a variable named s_2_1 and an error message is deliver for each usage. Please review the launch of periodic task and the enabling/disabling of this task with s_2_1 variable.

DII - Discret Input Interrupts

The configuration (id of the involved LADx, time interval, …) of DII is not translated in Unity-Pro. However, the ladder code is translated like the other LADx as a sub-routine in Unity-Pro. The usage of the S:2/1 system bit is also translated as a variable named s_2_1 and an error message is deliver for each usage. Please review the launch of event task and of enabling/disabling of this task.

The Special functions

The body of special functions (communications, regulation, axes, motion, …) are not translated. Only interfaces are kept. The user has to translate them manually and probably rewrite all the code where these blocks are called.

The user functions blocs

There is no user functions blocs in PLC5 like the ADD_ON of RSLogix5000, FB or FC of STEP7 and DFB of Unity_PRO.

Intrinsic limitations of the conversion

Indirection on File number

Indirection on File number is not supported on I/O. Please revise the destination code or modify the source code.

Lose comment inside expressions

The comment inside expressions are not translated in Unity-Pro. Please revise the destination code.

Unsupported ladder instruction

Some instruction in Ladder are not supported (eg: ACN, MSG, FOR, BRK, NXT, …)

Unsupported Parameters for COP instruction

Some instruction parameters of COP instructions are not supported

Lost meta information attached to a comment

The meta information attached to comment are not translated.

Unsupported MCR instruction behavior

The MCR instruction (Master Control Relay) as no equivalent in Unity-Pro. The Logic must be revised.