Hi,
I am controlling 10 of the same type of device. I have a UDT that has all the control parameters for 1 device. I then make a tag that holds 10 instances of that UDT.
So for example ControlData[0] is all of the parameters for the first device and ControlData[1] is all of the parameters for the second device, etc.
So on my HMI screen I can have a numerical display that shows ControlData[0].CurrentSpeed , or whatever I like. No problem. The issue is that for larger projects that have 20 or 30 of these devices, I don't want to duplicate 20 or 30 screens.
I want to have a tag that indicates the current axis, and have the one HMI screen display the ControlData for the current axis. So for example I want to display ControlData[CurrentAxis].CurrentSpeed.
I'm using a maple systems HMI, and it doesn't understand the concept of indirect addressing. It has functionality for index registers, but it wont work with my UDT. So what I would have to do is have logic on the PLC to copy the Current Axis Data into a temporary location that the HMI can look at.
So for example Copy ControlData[CurrentAxis].CurrentSpeed to HMI_ControlData.CurrentSpeed every scan, and point my buttons on the screen to HMI_ControlData. That works, but I'm wondering if there is a more elegant solution. My UDT's are very large, and I don't like copying huge amounts of data into temp tags every scan.
I come from the land of computer science, assembly, c, c++, etc. Is there no way that I can have a tag that is a reference to a location in an array?
Regards,
Adam
I am controlling 10 of the same type of device. I have a UDT that has all the control parameters for 1 device. I then make a tag that holds 10 instances of that UDT.
So for example ControlData[0] is all of the parameters for the first device and ControlData[1] is all of the parameters for the second device, etc.
So on my HMI screen I can have a numerical display that shows ControlData[0].CurrentSpeed , or whatever I like. No problem. The issue is that for larger projects that have 20 or 30 of these devices, I don't want to duplicate 20 or 30 screens.
I want to have a tag that indicates the current axis, and have the one HMI screen display the ControlData for the current axis. So for example I want to display ControlData[CurrentAxis].CurrentSpeed.
I'm using a maple systems HMI, and it doesn't understand the concept of indirect addressing. It has functionality for index registers, but it wont work with my UDT. So what I would have to do is have logic on the PLC to copy the Current Axis Data into a temporary location that the HMI can look at.
So for example Copy ControlData[CurrentAxis].CurrentSpeed to HMI_ControlData.CurrentSpeed every scan, and point my buttons on the screen to HMI_ControlData. That works, but I'm wondering if there is a more elegant solution. My UDT's are very large, and I don't like copying huge amounts of data into temp tags every scan.
I come from the land of computer science, assembly, c, c++, etc. Is there no way that I can have a tag that is a reference to a location in an array?
Regards,
Adam