Hi,
I had the same problem with PLC4X and also with plain Milo. One OPC UA Server 
didn’t allow to set a time on write and another OPC UA Server didn’t work 
without setting a time :-) … so I think it is a good idea to make this 
configurable …. there are so many options available in OPC UA…

Btw: What is the default in PLC4X for the Monitoring Filter Parameter? Milo 
default is to trigger a change on State or Value change… but in my case I also 
wanted to get notified if just the timestamp changes…. so I had to add an 
option for that…
Regards,
Andreas

> On 11.03.2021, at 16:35, Matthias Milan Strljic <[email protected]> 
> wrote:
> 
> Hi Jim and Ben,
> 
> I think I know where this comes from. In the rework process we missed the
> changes i added at the commit "d45f748b08d6c083a22993e756114ec8840589fa"
> where it enforced the timestamp of a value to "null" because Siemens does
> not allow you to write the timestamps of a value on your own.
> In the past i just made the timestamp null for all requests but i think
> that is not a really good default behavior should we add there an option
> for that @Ben?
> 
> Greetings Matthias
> 
> Am Do., 11. März 2021 um 16:24 Uhr schrieb Matthias Milan Strljic <
> [email protected]>:
> 
>> Hi Jim,
>> 
>> nvm i over read the part with "Reading was OK" :D
>> 
>> 
>> Am Do., 11. März 2021 um 16:21 Uhr schrieb Matthias Milan Strljic <
>> [email protected]>:
>> 
>>> Hi Jim,
>>> 
>>> an addition to what Ben wrote. Make sure that you wrote the symbol of a
>>> Siemens value correct. Some versions of Siemens TIA Variable mappings
>>> require the ["]-Symbol included. So your path could also be required to
>>> escape those.
>>> In your case this could be something like:
>>> builder.addItem("S7PLC.CureAbort", "ns=2;s=\"S7PLC\".CureAbort:BOOL", true);
>>> As far as i worked with it correlates with the structure of your project
>>> and your modularization in Components and FunctionBlocks but this is not
>>> consistent over all used PLC or Sinumerik Controls.
>>> 
>>> Greetings Matthias
>>> 
>>> 
>>> Am Do., 11. März 2021 um 15:29 Uhr schrieb Wang, Jim <
>>> [email protected]>:
>>> 
>>>> Hi PLC4X team,
>>>> 
>>>> When I use PLC4X's OPCUA protocol to write PLC, I always get
>>>> ACCESS_DENIED for the PLC's tag (Reading is OK.)
>>>> I list my code and message I get below in FYI: sections.
>>>> How can I get rid of this issue?
>>>> Thanks,
>>>> 
>>>> Jim
>>>> 
>>>> 
>>>> FYI: my codes
>>>> ==================================
>>>>       public static void WritePLC(PlcConnection plcConnection) throws
>>>> InterruptedException, Exception, TimeoutException {
>>>>              PlcWriteRequest.Builder builder =
>>>> plcConnection.writeRequestBuilder();
>>>>              builder.addItem("S7PLC.CureAbort", "ns=2;s=
>>>> S7PLC.CureAbort:BOOL", true);
>>>>              PlcWriteRequest writeRequest = builder.build();
>>>>              PlcWriteResponse response = writeRequest.execute().get();
>>>>              for (String fieldName : response.getFieldNames()) {
>>>>                  if(response.getResponseCode(fieldName) ==
>>>> PlcResponseCode.OK) {
>>>>                     System.out.println("Value[" + fieldName + "]:
>>>> updated");
>>>>                  }
>>>>                  else {
>>>>                     System.out.println("Error[" + fieldName + "]: " +
>>>> response.getResponseCode(fieldName).name());
>>>>                  }
>>>>              }
>>>>       }
>>>> 
>>>> FYI: the message when I run my codees
>>>> ======================================
>>>> opcua:tcp://localhost:49601/
>>>> [main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new
>>>> PLC Driver Manager with class loader
>>>> jdk.internal.loader.ClassLoaders$AppClassLoader@443b7951<mailto:
>>>> jdk.internal.loader.ClassLoaders$AppClassLoader@443b7951>
>>>> [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering
>>>> available drivers...
>>>> [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver
>>>> for Protocol s7 (Siemens S7 (Basic))
>>>> [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver
>>>> for Protocol opcua (OPC UA (TCP))
>>>> [main] INFO org.apache.plc4x.java.opcua.connection.OpcuaTcpPlcConnection
>>>> - Configured OpcuaTcpPlcConnection with: host-name 127.0.0.1
>>>> [NonceUtilSecureRandom] INFO
>>>> org.eclipse.milo.opcua.stack.core.util.NonceUtil - SecureRandom seeded in
>>>> 0ms.
>>>> [main] INFO org.eclipse.milo.opcua.sdk.client.OpcUaClient - Eclipse Milo
>>>> OPC UA Stack version: 0.5.3
>>>> [main] INFO org.eclipse.milo.opcua.sdk.client.OpcUaClient - Eclipse Milo
>>>> OPC UA Client SDK version: 0.5.3
>>>> Error[S7PLC.CureAbort]: ACCESS_DENIED
>>>> Find West on Twitter <http://twitter.com/#!/WestPharma> and LinkedIn<
>>>> http://www.linkedin.com/company/west-pharmaceutical-services?trk=fc_badge
>>>>> .
>>>> 
>>>> ________________________________
>>>> The contents of this message are confidential and may be privileged. If
>>>> you have received this message in error, please permanently delete it,
>>>> along with any files that may be attached to this message, without reading,
>>>> printing, copying, forwarding or otherwise distributing it. Please notify
>>>> the sender of the error immediately so that we can prevent it from
>>>> happening again.
>>>> 
>>>> 

Reply via email to