I have a Structure in my project which has a few nested UDTs. They are ultimately of type DINT. What I would like to do is copy the values out of the UDT array into a simple DINT array but I don't know how I can loop through it's members programmatically since I can't use an INT as a pointer.
Are there any tricks with Studio5000 I don't know about for copying members of a structure into another of the same Data Type? I tried CPS but it didn't work since they aren't the same. At least I didn't see it working correctly.
Here are the specifics:
A structure which has Each Day of the week as a UDT (7 members).
Each Day has 8 DINT entries named Start_1 Stop_1, Start_2 Stop_2 etc. As a UDT. So a total of 56 DINTS for the whole structure.
I want to numerically parse each value of the entire structure (56 DINTS) and compare it's value but I don't have a nice way to loop through the structure. So I thought I would copy the values into a simple DINT[56] and then evaluate that programmatically with a pointer. But the Copying is going to be tedious if I can't find a better way to do it.
Any thoughts?
Are there any tricks with Studio5000 I don't know about for copying members of a structure into another of the same Data Type? I tried CPS but it didn't work since they aren't the same. At least I didn't see it working correctly.
Here are the specifics:
A structure which has Each Day of the week as a UDT (7 members).
Each Day has 8 DINT entries named Start_1 Stop_1, Start_2 Stop_2 etc. As a UDT. So a total of 56 DINTS for the whole structure.
I want to numerically parse each value of the entire structure (56 DINTS) and compare it's value but I don't have a nice way to loop through the structure. So I thought I would copy the values into a simple DINT[56] and then evaluate that programmatically with a pointer. But the Copying is going to be tedious if I can't find a better way to do it.
Any thoughts?