04-23-2018, 12:19 PM
Lets say I have the following ptr definition:
ptr valve1->PowerBrick[0].GpioData[0].16.1;
If I want to manipulate that IO port in the NC interface I need to figure out which M variable the pointer is stored in and then create a Device Member with that M variable as the getter and setter.
Now if I build the code on slightly different hardware or with a slightly different configuration then that M variable number will change. Is there any way for me to select the number that the pointer will be stored under, so I can make sure my code works in different configurations?
If not, is there any way for me to manually define a P variable that points to the pointer? (i.e. P8001 -> addressOf(valve1))
NOTE: I know it is possible for me to define the getter/setter in the devices.xml and then make a custom xml file for every machine, I am trying to avoid having to do that.
ptr valve1->PowerBrick[0].GpioData[0].16.1;
If I want to manipulate that IO port in the NC interface I need to figure out which M variable the pointer is stored in and then create a Device Member with that M variable as the getter and setter.
Now if I build the code on slightly different hardware or with a slightly different configuration then that M variable number will change. Is there any way for me to select the number that the pointer will be stored under, so I can make sure my code works in different configurations?
If not, is there any way for me to manually define a P variable that points to the pointer? (i.e. P8001 -> addressOf(valve1))
NOTE: I know it is possible for me to define the getter/setter in the devices.xml and then make a custom xml file for every machine, I am trying to avoid having to do that.