Posted 16 April Hi All, I am Data Transferring Arrays of WORD's from a HMI to NX PLC. This Transfer may be a variety of data types, Likely just UINT and STRING[20]. It will be Imported to NX as an Array of Word What im trying to do is Populate my Structure from this Array of Word. I can do this by mapping them individually just fine. But i was hoping i could add them automatically. Much like when you assign EthernetIP tags and can link them to a structure and User Offset the Bytes. But i cant seem to Link the Array of Word to the Structure e.g. SENSORS_STORED:=DATA_2_IN; Says its impossible Anyone have any ideas how i could Populate this structure from a WORD Array without manually mapping and Converting Each? SENSORS_STORED.Fixture_ID:=WORD_TO_UINT(DATA_2_IN[0]); For Example is a workable way but is long winded and was hoping there is a easier way Thanks in Advance Dann Share this post Link to post Share on other sites
Posted 17 April Does it need to map to an array of words or just a datatype that is equivalent in size to the array of words? Some devices only need the data size to match. Maybe you can create you your custom datatype structure that ends up 140 bytes. Alternatively create a union data type. Share this post Link to post Share on other sites
Posted 17 April Enable the CJ-Series memory locations first. If the PLC is an NJ they are enabled by default, for NX controllers you'll find it in the multiview explorer. In the AT column assign an identical address to both variables and they will mirror one another. 1 person likes this Share this post Link to post Share on other sites
Posted 17 April 3 hours ago, photovoltaic said: Enable the CJ-Series memory locations first. If the PLC is an NJ they are enabled by default, for NX controllers you'll find it in the multiview explorer. In the AT column assign an identical address to both variables and they will mirror one another. I too like this method, however as you can use AT % in program scoped data variables too, i find it can lead to problems very quickly. There is no way to cross reference, or a memory map to show what addresses have been allocated etc. I use this method for making a program scoped tag available between programs without using a global variable. 1 person likes this Share this post Link to post Share on other sites
Posted 17 April 4 hours ago, photovoltaic said: Enable the CJ-Series memory locations first. If the PLC is an NJ they are enabled by default, for NX controllers you'll find it in the multiview explorer. In the AT column assign an identical address to both variables and they will mirror one another. That's perfect thanks, such a simple solution Although I've now found I don't have to do this, as I was Querying a SQL database via the HMI and writing to HMI memory then bulk sending that data down as array of words. I found I can just do same query again but send direct to the PLC structure Variable members via tags. But definitely worth knowing this, thanks again Share this post Link to post Share on other sites
Posted 17 April 2 hours ago, chelton said: I too like this method, however as you can use AT % in program scoped data variables too, i find it can lead to problems very quickly. There is no way to cross reference, or a memory map to show what addresses have been allocated etc. I use this method for making a program scoped tag available between programs without using a global variable. You definitely need to exercise caution with this method. Personally I segregate the memory and only use certain banks for certain purposes. %W is for conversions, %D for everything else. Share this post Link to post Share on other sites