ViperDaSnake
Member
Is there a command that you can use against a UDT that will fill it with zeros? Of course the UDT has dint, bool and strings...
EX: FLL UDT_test_one 99999
EX: FLL UDT_test_one 99999
Sorry to resurrect this post from the dead, but I was trying to do something similar to what is said here with an array of UDT's using a COP command, and it faulted out my controller by putting a lot of garbage in the array.
Based on search of Rockwell site, that might be expected behavior since COP does 32 bit chunks and my UDT has strings and bools in it so it sounds like it gets misaligned. So I think what is mentioned here in the post is zeroing out a single element.
Am I missing something here, should a COP where you have a source which is a single UDT instance to a destination of an array work or is it expected for that to fail? If it's expected to fail, what is the best way to do a write like this to an array of UDTs? I'm looking to initialize my array...do I need to use a FOR loop and cycle through the elements one by one?