Hello all,
I'd like to be able to use pointers to digital inputs and digital outputs, is it possible somehow?
Thank you all!
Hello all,
I'd like to be able to use pointers to digital inputs and digital outputs, is it possible somehow?
Thank you all!
Yes I knew that, but I would like to be able to use a more advanced method like reference by name, an alias as in abb or a pointer.
We make similar machines but usually i/os are not in the same order then I would need to reassign all the indexes.
I can use this, at least for what I asked about.
So, even I'd love something different, thank you.
can you use signals?
As Panic says, you can use SIGNAL declarations:
SIGNAL iToolChangerUnlocked $IN[101]
SIGNAL oToolChangerUnlock $OUT [101]
SIGNAL i8bitsFromPLC $IN[109] TO $IN[116]
After that, the names are "pointers" to that particular I/O.
If your problem is that different robots use different $OUT/$IN indices for the same signals, my first suggestion is to beat the controls hardware designers until they perform better. Failing that, I tend to use a "Global Definer" module, which contains INT variables for the correct $IN/$OUT indices, and has executable KRL code in the .SRC file unique to each robot that "sets" those variables to the correct values.