cardosocea
Member
Hello,
I'm writing an interface program to a machine and because the bit data is packed into 16 bit variables, it's nicer to create an UDT to describe what each bit does and then enclose it within the data map from the machine.
This way, in my mind, I'd copy the IO data (two arrays with 100 INTs) into the structure and eveything would match nicely.
However, I'm now seeing that even though my UDT's only have 16 bits, the size is larger than that and as such creates shifts in the data making it impossible to map nicely.
Am I doing something wrong or is the minimum size of an UDT 32 bits because that's all the processor can understand?
I'm writing an interface program to a machine and because the bit data is packed into 16 bit variables, it's nicer to create an UDT to describe what each bit does and then enclose it within the data map from the machine.
This way, in my mind, I'd copy the IO data (two arrays with 100 INTs) into the structure and eveything would match nicely.
However, I'm now seeing that even though my UDT's only have 16 bits, the size is larger than that and as such creates shifts in the data making it impossible to map nicely.
Am I doing something wrong or is the minimum size of an UDT 32 bits because that's all the processor can understand?