Shane.platt
Member
Hi everyone,
I hope this isn’t too much to ask?!? I hope no one minds my “new programmer” questions. Deep breath, here goes…
I am having some trouble understanding when to use a Program or Task. I need to write logic for machine that will have 3 operating modes, Idle, Manual, Auto.
1. Idle mode will have the coolant circulating, heating elements at preheating temp and web pretension.
2. Manual mode will be just that; all the systems can be manually controlled independently.
3. Auto will confirm all the different systems are started and reached setpoint then once confirmed will start web travel.
My issue is I am not sure how to accomplish each mode.
My options:
Option 1: Create all the tags in the controller tags section(Global) and create different modes (Routines) in the MainTask:MainProgram. Each mode being a routine, and then use JSR or Event to initiate each mode from the MainProgram? This options eliminates destructive bits due to the ability to see all tags as global tags in Controller Tags. I have attached a picture to help illustrate named option1
Problems with Option #1
1. Different routines have different priority. Web travel needs to be the fastest scan rate.
2. 20+ routines (Setup of Servo Drives, Pumps, tank level control, etc) makes following the program difficult.
Option 2: Create different programs under the MainTask for each mode and create program tags(Local) for each program and use alias to manage hardwire inputs and outputs. I have attached a picture to help illustrate named option2
Problems with Option #2
1. Excessive amount of redundant tags for each program to manage hardwire I/Os
2. I am not sure how to integrate the different local tags between programs.
3. Excessive amount of destructive bits because of reason 1.
I hope this isn’t too much to ask?!? I hope no one minds my “new programmer” questions. Deep breath, here goes…
I am having some trouble understanding when to use a Program or Task. I need to write logic for machine that will have 3 operating modes, Idle, Manual, Auto.
1. Idle mode will have the coolant circulating, heating elements at preheating temp and web pretension.
2. Manual mode will be just that; all the systems can be manually controlled independently.
3. Auto will confirm all the different systems are started and reached setpoint then once confirmed will start web travel.
My issue is I am not sure how to accomplish each mode.
My options:
Option 1: Create all the tags in the controller tags section(Global) and create different modes (Routines) in the MainTask:MainProgram. Each mode being a routine, and then use JSR or Event to initiate each mode from the MainProgram? This options eliminates destructive bits due to the ability to see all tags as global tags in Controller Tags. I have attached a picture to help illustrate named option1
Problems with Option #1
1. Different routines have different priority. Web travel needs to be the fastest scan rate.
2. 20+ routines (Setup of Servo Drives, Pumps, tank level control, etc) makes following the program difficult.
Option 2: Create different programs under the MainTask for each mode and create program tags(Local) for each program and use alias to manage hardwire inputs and outputs. I have attached a picture to help illustrate named option2
Problems with Option #2
1. Excessive amount of redundant tags for each program to manage hardwire I/Os
2. I am not sure how to integrate the different local tags between programs.
3. Excessive amount of destructive bits because of reason 1.