ORPHEE / UNITY path general informations

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

Variable translation schemes

The name and comment of the variables are kept with their initial values. Some ORPHEE variables names may not be supported under Unity (i.e. reserved mnemonic, …). These variables are renamed by adding a suffix or a prefix to the original mnemonic.

Internal variables

The internal variables are kept except for the the RX bits.

Digital input/output

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

Analog input/output

The mapping of the analog input/output of the source must be done by the user to define the new location in the new hardware configuration.

Warning for the analog format :

  • With ORPHEE, the analog format for input and output is between 0-32767 points. Each analog board is associated to an array of word whose size corresponds to the number of analog input/output of the board.
  • With UNITY, the the format is between 0-10000 points for each analog input/output.

A scaling (for inputs and outputs) must be performed manually and the scaling output must be assigned to the corresponding word.

Codes modules translation schemes

CC (combinatoire cyclique)

CC is converted in sections. The section name is made with the CC number and the CC name. Example :

CCOrphee NameUNITY Section
1StartCc1_Start

EP (program Event)

EP is converted in subroutines. The SR name is made with the EP number and the EP name. Example :

EPOrphee NameUNITY Subroutine
1InitG7Ep1_Initg7

EI (interface Event)

EI is translated in subroutines. EI is a subroutine called on rising and/or falling edge on a combination of inputs. This combination of inputs are configured directly on the input board. <note>The calls for EI are not converted. Hardware configuration has to be manually edited or »» have a complete listing of the program to find the combinations of inputs triggering the call to an EI.</note>

ES (System Event )

ES is in Mast_Es_Sections written in literal language.

ORPHEEComment
ES0ON→OFF
ES1DIAG
ES2OFF>ON
ES3RUN>STOP
ES4STOP>RUN
ES51/100s
ES61/10s
ES71s

The translation scheme in UNITY is :

if Es0 then
  .....;
end_if;

if Es1 then
  .....;
end_if;
 
....

if Es7 then
  .....;
end_if;

All Esx variables are translated by non-addressed Boolean.
The code needs to be manually revised.

<note> ES5, ES6 and ES7 may be considered like periodic tasks. The user must choose the best conversion scheme. </note>

TD (Default Processing)

TD is converted by SR (subroutine).

TD calls can be configured for each card:

  • default setting
  • internal fault
  • external fault
  • No Run
  • Run

<note> The calls for TD are not converted. The TD calls must be converted manually according to the event that triggers (board setting) the call of TD. </note>

SFC

Master SFC

Converted in SFC.

Slave SFC

Converted in SFC.

<note> The notion of SFC slave does not exist in UNITY. SFC slave are converted as simple SFC. </note>

Macro SFC

Converted in SFC Macro State .

TR

Converted in one section for one SFC, where all transitions are evaluated.
<note>

Convertion may contain code in addition to the evaluation of the transition. in this case, the user has to make this part of the code to the previous step deactivation or the next step of activation. </note>

TT

Converted in one SR by State. This SR is called in Actions directory of the SFC

TG

Converted in one SR by Slave SFC. This SR is called in Actions directory of the Master SFC.

BFC SFC Management

These BFC are Converted in DFB without code.

  • DESACGE
  • DESACGM
  • INITGE
  • INITGM
  • DEGELGE
  • DEGELGM
  • DESACGE
  • DESACGM
  • FORCGE
  • FORCGM
  • FORCXE
  • GACGE
  • GACGM
  • GINGE
  • GINGM
  • MEMGE
  • MEMGM
  • MEMXE

Comments of the program

The comments of the program are kept.

BFC

Timers and Counters

The BFC TON, TOF, TP, PULSOR, COUNT are converted as DFB

BFC ORPHEEUNITY DFB
TONBfc_ton
TOFBfc_toff
TPBfc_tp
PULSORBfc_pulsor
COUNTBfc_count

BFU

The user defined function bloc (BFU) are converted under Unity as DFB.

Special functions

Special functions (i.e. communications, regulation, axes, motion, etc.) are not converted. Manual conversion is necessary.

intrinsic limitations of the conversion

Array indexation

With APRIL PLCs, the index of array can go out of the range of the array. This behavior is not supported by Unity. The conversion works only for index inside the array range. It means that if in your application an index goes over the range of the array, the behavior of the application is not reproduced in Unity.

Timers and counter scan

When timers or counters are not scanned (in a conditional jump in a non validated CC, ….) the current value is frozen. At the resumed of the scan, the evolution of the current value is from this frozen value.
The user must check the timers or counter potentially not scanned in the code,and choose the best translation.

Timers and counter Arrays

ORPHEE allows the use of counters and timers arrays.
The user must identify the Indexed access to arrays or counters in the code,and choose the best translation.

Calling TD

Calling EI

Calling ES

RX memory plan

RX bits have no correspondence with UNITY.
RX bits are memorized bits. It means that the value before a loss of power is kept after the power on of the PLC.
To reproduce this behavior, those RX bits should be mapped on %MW memory plan.
For the RX array, at the end of the PLC cycle, the RX array bits are saved in »» bits of word.
when starting a PLC Cycle, the saved »» bits in word are copied in the RX bits mapped in %M.

<note>IMPORTANT :These memory plans %MW and %M must be mapped outside memory plan used on the application</note>.

TR with code in addition to the evaluation of the transition

Analog Inputs/Outputs