cancel
Showing results for 
Search instead for 
Did you mean: 

Can't write data to OPC UA or DA Tag via PCo to Kepware

2,634

I'm trying to write a simple value boolean to test the connection between my

PLC -> Kepware -> PCo -> MII

And i'm successfully able to Read all tags and Metadata from the configured services as well, all being performed via MII 'Tag Retrieve Query' service ,but when i try to do the opposite and do a 'Tag Store Query' or even create a Transaction and "forcing" the values and behaviors of that PCoQuery MII always gives back to me Fatal Error - Selected PCo data server is not enabled for write access

So obviously i know that my problem is between my PCo -> Kepware, what i want to know or even some guidance is where,how or what i still have to do to perform this tasks, I want to know where i can find information in SDN where i can configure my destination system or instance agent for OPC DA and OPC UA and how i have to configure the service to performing the write option

Remembering i'm connecting successfully Kepware 6.5 to PCo 15.2 all my tags are Read/Write Access privileges so i'm really thinking the problem is on the "binding" the way back from PCo to Kepware, and couldn't find nothing on internet and sdn.

Any help will be truly appreciated !

PS: If necessary i can share the prints and configurations done on PCo and stuff

Accepted Solutions (0)

Answers (3)

Answers (3)

Abhijeet Naste and JACK HUANG thanks a lot for your answers and sorry to the reply, here is what i'm trying to do in SAP PCo via OPC UA.

Just to explain what I want to do, above I have a simple connection landscape, where we want to maintain a connection between PLC and PCo to let our system know if the connection between KepServer/PCo agent is connected with PLC and the connection is active.

So to explain how our proccess is made i will explain each point from 1 to 8 and i just made the image to be self-explanatory

  • 1. In this case we have 2 Tags in the PLC
  • a. 1° Trigger_PLC which is a boolean and our trigger agent to PCo,
  • b. 2° Trigger_MES which is also a bool and will receive the 1 value back when the web app via web socket ou a PCo query in transaction receive the one from Trigger_PLC.
  • 2. I created a source system OPC UA, a Agent Instance to connect to MII and the flow of information back will be sent in this channel, the destination systems created in that scenario is not being used.

  • 3. Information comes in JSON to MII via Data Server channel created.
  • 4. Receive information as a WebSocket message.
  • 5. When Trigger_PLC == 1, the app calls a PCo query to WRITE Trigger_MES = 1 back to PCo
  • 6. Send this req from MII to PCo
  • 7. Send this value to Kep
  • 8. PLC recives the value of Trigger_MES = 1, zero both and send Trigger_PLC = 1 again and keep doing that in a closed loop while the connection is up and running

So why am i writing this question here? cause is not the best practice maintaining this communications in separated layers, and i really want to hear that PCo is able to do all this tasks itself via OPC UA locally, how my MII instance is on the cloud any link drop and if I lose the connection I will stop my application logic to work robustly or even stop some machine, and i cannot take this risk.

After a lot of research on the Internet and SCN I just could find:

https://answers.sap.com/questions/136581/pco-as-ua-server-with-a-method-empexampleimplement.html

Which is not the best solution for me, I Just want to know if there is some way to keep this logic on the PCo level and make this data flow logics come back to KepServer and PLC from PCo without need to go to MII and using or a Transaction or a WebSocket in a page to make this work !
Like this:


I know that the OPC UA in PCo is Method Based but most of the software I know that works with OPC UA like Kepware are not EMP what I really want to know and understand is if there is some way to be possible or fast to do this alone in OPC UA in PCo without a need to develop some additional or custom logic like the document describes, and if there is another way like Modbus to send this information back to Kepware and PLC.

Thanks a lot for the support and attention, looking forward to get any response, thank a lot guys.

abhinaste
Explorer
0 Kudos

Hi,

In the data servers configuration in MII you might have created the PCo server connection for the relevant PCo Agent. There is one checkbox to so as to allow that connection to write. Try using ticking that writable checkbox and then fire the PCo write query.

Regards,

Abhijeet

Former Member
0 Kudos

Hello there!

PLC write:

1. Connection between PLCs - > Is Kepware using the MODBUS protocol?

2. If you are using MODBUS, then write attention:

2-1. The MODBUS address of the PLC has a function code, some addresses are allowed to be written, and some addresses are not allowed to be written.

For example: PLC_OUT (output) 000001-065536 [Read] The function code is 01, [write] function code is 05;

PLC_IN (input) 100001-165536 [Read-only] The function code is 02;

MODBUS specific function table, PLC has [function code description]

Purely a personal point of view, there are shortcomings, please understand and give pointers, learn from each other and progress.

Thank you!

Jack huang