9/16/2014 11:07 PM | |
Joined: 12/8/2011 Last visit: 5/22/2023 Posts: 7 Rating:
|
Thanks for the response. Its a general quesiton I suppose; I have a struct defined that encapsulates all the elements of a machine 'function', including a timer. I now have an array of this struct to define all similar points on the machine. I loop through the array processing each in turn. So the question is still why cannot it be accessed by #heads[#i].timer(IN:=true,PT:=T#50ms); or #heads[#i].timer.TON(IN:=true,PT:=T#50ms); I would not want to define the timer elsewhere (as a global for example) as the proper place for it from a encapsulation point of view is in the struct or UDT. (sorry I'm a computer sci grad) ... Passing it to a FC function is fine. I was just wondering AttachmentTONExample.zap13.zip (164 Downloads) |
Last edited by: Min_Moderator at: 9/17/2014 10:55 AMNew subject after splitting from /tf/WW/en/Posts/114364#top Last edited by: William Ratcliffe at: 9/16/2014 11:24 PMI''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''ve attached an archived project for the interested containing the pertinent blocks |
|
Follow us on