Hi, friends. I got a strange situation trying to write data to db in s7-314-2dp via opc-server.
The code is written on C#:
I'm connecting to OPC-server. Reads all items. After it - I save OPC-group object to private member gr.
After it I'm trying to write data to OPC-item via my OPC-group:
And happens unpredictable to me thing: my program hangs, at this moment plc still has old value in db. After it I press "Stop Debugging" in studio and studio hangs for about 1 minute and then data, which I was writing to plc, apears in plc.
Thanks for attention.
The code is written on C#:
I'm connecting to OPC-server. Reads all items. After it - I save OPC-group object to private member gr.
Code:
private OPCAutomation.OPCGroup gr; // My OPC group
Code:
try
{
gr.OPCItems.Item(name).Write(val);
}
catch (Exception)
{
}
Thanks for attention.
Last edited: