This chapter gives the general informations for ORPHEE to UNITY conversion path.
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.
The internal variables are kept except for the the RX bits.
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.
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 :
A scaling (for inputs and outputs) must be performed manually and the scaling output must be assigned to the corresponding word.
CC is converted in sections. The section name is made with the CC number and the CC name. Example :
| CC | Orphee Name | UNITY Section |
|---|---|---|
| 1 | Start | Cc1_Start |
EP is converted in subroutines. The SR name is made with the EP number and the EP name. Example :
| EP | Orphee Name | UNITY Subroutine |
|---|---|---|
| 1 | InitG7 | Ep1_Initg7 |
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 is in Mast_Es_Sections written in literal language.
| ORPHEE | Comment |
|---|---|
| ES0 | ON→OFF |
| ES1 | DIAG |
| ES2 | OFF>ON |
| ES3 | RUN>STOP |
| ES4 | STOP>RUN |
| ES5 | 1/100s |
| ES6 | 1/10s |
| ES7 | 1s |
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 is converted by SR (subroutine).
TD calls can be configured for each card:
<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>
Converted in SFC.
Converted in SFC.
<note> The notion of SFC slave does not exist in UNITY. SFC slave are converted as simple SFC. </note>
Converted in SFC Macro State .
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>
Converted in one SR by State. This SR is called in Actions directory of the SFC
Converted in one SR by Slave SFC. This SR is called in Actions directory of the Master SFC.
These BFC are Converted in DFB without code.
The comments of the program are kept.
The BFC TON, TOF, TP, PULSOR, COUNT are converted as DFB
| BFC ORPHEE | UNITY DFB |
|---|---|
| TON | Bfc_ton |
| TOF | Bfc_toff |
| TP | Bfc_tp |
| PULSOR | Bfc_pulsor |
| COUNT | Bfc_count |
The user defined function bloc (BFU) are converted under Unity as DFB.
Special functions (i.e. communications, regulation, axes, motion, etc.) are not converted. Manual conversion is necessary.
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.
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.
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.
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>.