TYPE AS0153_TRIM_PRESS_MODE :
(
(*
Mode in which the press will aim to reach a state where physical access ;
this may (or may not) require human intervention depending on the case )
stop_and_secure := 0,
(
Normal run mode. Loading may be automatic or manual : see relevant
configuration variable for more information. )
run := 10,
(
Set-up mode. Allows tool to be put on the press and clamped. )
setup := 20,
(
Expert (maintenance) mode allowing control of individuel actions.
*)
expert := 99
);
END_TYPE
When I try to write value to my tag I got an error… My tag is Integer.
Maybe someone will recognise what you’re referring to, but for the rest of us, what PLC are you talking about?? I haven’t seen enums used in any of the PLCs we use (then again, I’m also not a PLC guy)
Also, how is your tag configured in Ignition? (screenshot?)
I have tried with UA Expert and all works great. I got too my list of enumeration. My datatype in my enumeration is short. Does Ignition can support enumaration like UA Expert ?
Ignition does support enum values from OPC UA but it won’t list the symbolic name for each member. They are integer values when used in Ignition OPC tags.
Okay, it’s failing because the server returns Bad_TypeMismatch when Ignition writes an Int32 value.
The server reports the DataType as identified by NodeId |type|CODESYS Control Win V3 x64.amt_machine_30.AMT_AS0153.AS0153_TRIM_PRESS_MODE, so need to figure out what underlying DataType that resolves to.
If possible, can you browse in UaExpert under Types > DataTypes > BaseDataType, and start looking for this Node? You mentioned it’s an Enumeration, so I’d expect to maybe find it under the Enumeration Node somewhere. If you can find it a screenshot of the browse hierarchy in UaExpert will be useful.
Also, if you can use Wireshark to capture the successful write from UaExpert that may provide a useful comparison.
Hmm, actually I have a guess at what might be wrong. The WriteRequest from Ignition includes a StatusCode in the value, which many servers do not support. It’s strange that the error reported is Bad_TypeMismatch but possible.
That the StatusCode is included with the value is a bug that only happens if coercion to the target datatype fails. There must be some problem reading the DataType tree from this server or using it to resolve the target type.
Turning these loggers to TRACE may yield more information:
What version of Ignition are you using? There should have been a message from the Conversions logger in between those 2. I can’t really see any reason for this not working right now though.