Freelance OPC Client variable
I set up an OPC client in Freelance because I need to get data via OPC from other equipment. The system is working perfectly and variables on variables list are ok, the OPC server is writing the OPC variables. The problem is that when I want to use a variable OPC in a function block, whena I check the project one error occurs with the message that you can not use this variable. How can I use a variable OPC in my logic?
Thank you for your help.
The short answer is: You can't.
To read OPC variables You need an OPC Client. The client functionality is integrated in Freelance Engineering (CBF) and Operation (DigiVis), but the controllers, which process application logic, don't have one. So Freelance Engineering can connect to OPC servers to allow creating the visualization with OPC variables and Freelance Operation can show those visualizations, becouse it can also read OPC variables, but they can't be used in programs, becouse the controller has no way to read their values.
You could do some tricks to bypass this. One of them is OPC server to server connection. In this case, as Freelance OPC server can read and write variables to controller, it could possibly synchronize with another server and then pass the values to controller.
Why do You need the OPC variables in logic? What is the source of these variables? In most cases there are other ways to get what You need, depending on what it is.
Exactly what mike replied, short answer is cannot...
An addition for last paragraph... logic resides and executed in controller so use variable in logic for that establish controller to controller communication over Modbus tcp/serial, Ethernet send/receive Or via profibus.
Get variable values into controller and use it for logic...
Hello Robson Zanetti,
I don't really get it - where would You like to create this logic? In controller? As I stated before - controller cannot read OPC variables so it can't get the values You would want it to write. In Freelance Engineering/Operations? There is no way to write a logic, that would run in this tools. In other application? That could work if You had a OPC client writen with Freelance API, so that I would have a direct connection with Freelance controllers. Or a client with other fieldbus connectivity, so it could connect with controllers. This could possibly work, but would require writing or finding a proper application.
If I got Your question wrong, please correct me.
Hope this helps,
To answer to Your last comment - the OPC_tag_type are special kind of objects, which are commonly refered to as Faceplates for OPC. They allow to use OPC variables to create Operator Faceplates for Freelance Operations/DigiVis. This allows to manipulate the OPC variables form a Faceplate which works and looks just as any other Faceplate in Freelance. It requires definition of so called OPC FB-class (a group of OPC variables from the same object) and then creation of faceplate (just like for the User Function Block).
With OPC_Tag_type created You simply connect with Freelance Engineering/CBF to OPC server and instate the tags. It can be done automaticly or manually. Either way this is all You need to do - You faceplates are ready to use.
You may find some examples of OPC_Tag_types delivered with Your Freelance system - see <Freelance installation folder>/export/FreelanceSampleTagTypeLib_Vx.y.prt for Freelance OPC_type_tags.
Hope this helps,
Can you clarify one more question about this topic, please?
This project wants to do something more with OPC Client Variables.
Now, the question is:
"Is this possible to log (for History) these values using CBF Engineering tool? Maybe, via Bulk Data Manager..
Thanks in advance,
The CBF does not have any logging capabilities - it's the DigiVis that does all the archiving etc. You could use Operation Log for logging OPC variables. The log files are stored on Operator Stations and can be transfered to other stations/PCs by the means of FTP. See Engineering Manual - Operator Station Configuration for more info.
Hope this helps,
I found a way on this manual, using Trend Display in Operator Station.
As I understood, using a Trend Data Acquisition Block with variables read from an OPC Server into Freelance System, we can configure Archive and File Transfer tabs for logging values on another PC in the Freelance net.
I'll start the test now! What do you think about it?
When it comes to OPC Servers (Freelance Gateways) You can do anything with the data - trending, logging, using in programs on Your controllers - becouse Gateways are connected through Control Network with Controllers. So if You have a OPC Gateway to which You can write the data from another system You can do anything and everything with them.
On the other hand if You use Freelance as a client You can log the OPC Variables (the same variables, which You CAN'T use in Controller applications etc.) in Operation Log (OPL) or Excel Reports (REPORT), becouse DigiVis/Freelance Operation has OPC client functionality build in.
One more thing - no matter what You choose (Server or client, logs, trends or reports) You will always use Archive and File Transfer tabs of specific object for configuring the archives.
Hope this clears thing up,