Remote Operations Forum
Support forum for Schneider Electric SCADA systems, radios and RTUs. From commissioning integration devices and software, to enhancing existing installations or troubleshooting.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-14 05:15 AM
Hello,
I was trying to set the .VALUE attribute of a RemoteConnect object using the OBJ_WriteField function. The help manual goes over the ATTRIB and DATATYPE fields for a system object, but it does not say that it works for a user defined object. Attempting to use the system fields results in a STATUS code of 5, or "Invalid attribute for the system function".
Is it possible to write to the .VALUE attribute through the code?
I am looking to use this to pull tagnames and default values from a CSV file to set the initial value of hundreds of tags when a default program is loaded.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-20 11:16 AM
I've tested this and I believe I can see your issue. You've specified a DATATYPE of 2, which is only for System Data. It does require the data type be INT as you used, but that type is really only for system data. I set up the logic the same as yours and got the same status code 5.
I changed the DATATYPE to 4 and changed the input object to a DINT in RemoteConnect. After that it is now working properly. Unless you actually want to work with system data objects, look in the "Attribute constants for analog objects" table in the OBJ_WriteField help.
You can write to ValueRaw as a DINT (115) or ValueEng as a REAL (116), or to any of the other attributes of a T_SPx70 object.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-17 02:07 PM
Hi,
Did you consider using a structured text routine with direct value assignments? e.g.:
test_INT.VALUE := 1234;
test_INT2.VALUE := 5678;
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-18 06:08 AM
I was trying to avoid hard coding any variables or values, as a master spreadsheet with DNP Point names/numbers and initial values creates a configuration csv to load in the scadapack. I am able to read the csv file with initial value currently, but I cannot find a way to set that value directly.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-20 11:16 AM
I've tested this and I believe I can see your issue. You've specified a DATATYPE of 2, which is only for System Data. It does require the data type be INT as you used, but that type is really only for system data. I set up the logic the same as yours and got the same status code 5.
I changed the DATATYPE to 4 and changed the input object to a DINT in RemoteConnect. After that it is now working properly. Unless you actually want to work with system data objects, look in the "Attribute constants for analog objects" table in the OBJ_WriteField help.
You can write to ValueRaw as a DINT (115) or ValueEng as a REAL (116), or to any of the other attributes of a T_SPx70 object.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-20 12:54 PM
Thank you.
I saw that this is now fully supported, and slightly better documented in RemoteConnect R3.0.5 that was just released, and am able to find the correct enumerations of the ATTRIB and DATATYPE parameters now.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.