plcs and fecs interconnection service new fesa/ ieplc-iii implementation f.locci, s.magnoni january...
Post on 02-Jan-2016
213 Views
Preview:
TRANSCRIPT
IEPLC 2011 release
PLCs and FECs interconnection serviceNew FESA/ IEPLC-III implementation
F.Locci, S.MagnoniJanuary 10, 2012
CERN BE/CO-FE
New FESA/ IEPLC-III implementation 2
IEPLC-III reminder
Basic concepts do not change• Device/Property model, Not intrusive, Block-data transfer, …
What’s new at a glance• IEPLC service is not FESA dependent anymore
A PLC class is not a FESA class anymore A PLC class is deployed using IEPLC dedicated JAVA tools IEPLC Service can be implemented from any C/C++ process (SLC5, SLC6)
• No FESA Client generated code anymore• No more dependencies with ORACLE database• Expert diagnostic tool and tracing• “Intelligent” mechanism to recover the PLC connection• ACET logging inside• Support for new Hardware: Schneider M340 (32bits)• …• WEB Documentation and Tutorial !!
F.L, S.M - January 10, 2012
New FESA/ IEPLC-III implementation 3
IEPLC-III Common use cases
F.L, S.M - January 10, 2012
New FESA/ IEPLC-III implementation 4
IEPLC-III Work-Flow
F.L, S.M - January 10, 2012
5
IEPLC-III: Client C++ API
REGISTER
One particular register of the DeviceKeeps the data value (input/output)
DEVICE
One instance of the ClassKeeps reference of its registers
PLCOne PLC of the Cluster
Keeps reference of Class instances
CLUSTER
Set of attached PLCs for aparticular Class/Version
SERVICE
Base component of IEPLC configuration
Keeps reference of the Cluster instances
static Service * getInstance ( int argc=0, char **argv=NULL ) void deleteInstance ()Cluster * getCluster ( string className, string classVersion )
PLC * getPLC ( string plcID )
void recv ( string blockName ) void send ( string blockName )
void connect ( SynchroMode mode, bool connectNow ) void disconnect ()
Device * getDevice ( string deviceID )
Register * getRegister ( string registerName )
<format> getVal<format> () void getVal<format>Array ( <format> * pVal, uLong dim )const <format> * getRef<format>Array ( <format> * pVal, uLong dim )timeval getTimeStamp ()
void setVal<format> ( <format> val )void setVal<format>Array ( const <format> * pVal, uLong dim )
Deprecated: char, uChar, short, uShort, long, uLong, float, date
Format: Int8, uInt8, Int16, uInt16, Int32, uInt32, Int64, uInt64, Float32, Float64, Date
New FESA/ IEPLC-III implementation 6
IEPLC-III Client code sample
SERVICE and CLUSTER set-up
Service* myService = Service::getInstance(argc, argv);
Cluster* myCluster = myServicegetCluster(“CLASS-A", “0");
PLC* myPLC = myClustergetPLC(“PLC-1”);
myPLCconnect (FULL_SYNCHRO, true);
…
In my process Init
F.L, S.M - January 10, 2012
SERVICE clean-up
Service::deleteInstance();
PLC access
//receive data-block of all devices of the cluster (in parallel)myClusterrecv(“AcqusitionBLK”);
//receive data-block of all devices from a particular PLCmyClustergetPLC(“PLC-2”)recv(“StatusBLK”);
//send data-block of a device to a particular PLCmyClustergetPLC(“PLC-1”)getDevice (“devLabel”)send(“ConmandBLK”);
VARIABLE access
//extract current value of a particular device register
Device* myDevice = myPLCgetDevice (“2”);
short aqnVal = myDevicegetRegister(“AqnRegName”)getValInt16();
//extract current values of an array (by value or by reference)unsigned long dim = myRegistergetDimension(); float* floatArray = (float*)malloc(dim);
myRegistergetValFloat32Array(floatArray, dim); //get copy of the table (correct dimension is expected)
float* floatRef = myRegistergetRefFloat32Array(dim); //get reference of the table (related dimension is returned)
In my process Action
In my process Exit
New FESA/ IEPLC-III implementation 7
IEPLC-III How to?
How to link with IEPLC-III library?• Include appropriate file into your Make.specific• Refer to IEPLC predefined CFLAGS and LIBS
How to validate your PLC connection?• Run the IEPLC expert tool from a Linux platform (VM or server)
From the IEPLC JAVA configuration tool directly Or using a command line: >iediag3
How to start tracing for your client process?• Start your client process with “-plcLog” argument• Enabling appropriate topic(s) to diagnose your process
How to know a little more?F.L, S.M - January 10, 2012
top related