Hi Arlin,
A few things you mention above jump out at me:
First: “… I make sure the previous one is archived.” Excellent. Archive often–hard drive space is cheap, your time is not!
Second: “… product flow… similar from job to job.” That makes me think you might benefit from using Subroutines or at least pointers. You could pass values to your subroutines, or have your pointers loop through different sets of points, depending on the customer, with different flags to indicate things like “number of storage/supply bins” and perhaps save yourself some time when it comes to the per-customer customization.
For a good example of how you might do that, I’d recommend taking a look at the “I/O Enabler” strategy (which is also helpful if you might ever lose communication to your I/O units for any reason). This strategy is installed with PAC Control, typically in a folder that looks something like:
C:\Program Files (x86)\Opto22\PAC Project 9.0\Control Basic Examples[B]IO_Enabler for Enet & PAC Brains[/B]
Or can be downloaded from the Opto 22 website here.
Pay special attention to the pink “User Initialization” OptoScript block in the chart called IO_Enabler_Chart. That’s where the pointers that get used throughout the code are pointed at the actual hardware.
Third: “export an entire strategy and import it into a new one.” Why not just copy the whole strategy and delete the parts you don’t need? Because you’re right: exporting/importing charts takes time, but deleting stuff out of your strategy tree can be extremely zippy! Here’s another Forum entry on clean up.
Of course, you can’t delete something if it’s being used in the strategy somewhere and therefore has a non-zero “Ref Count.” So, you can just remove all references to specific tags and replace them with a pointer to that tag (like I/O Units in the case of that “I/O Enabler” strategy). In that strategy, you’ll notice if you right-click on any of the I/O Units in the strategy tree, then do a Find, the only place those tags show up is in that pink “User Initialization” block I mentioned above.
Once you’ve replaced all the customer-specific tags with a pointer, you’ll be able to delete those tags that now should all have Ref Counts of 0.
Of course, you’ll need to initialize all those pointers to your strategy/customer-specific tags, preferably in one place – like that “User Initialization” OptoScript block. That way, when you go to customize your copied strategy, you can do it all in one place. You’ll also be able remove (or /* comment out */) all that initialization code temporarily and easily delete the customer-specific stuff for the next version of your strategy.
Sounds like you’re already in this habit, but I’ll mention it a few more times because it’s so important: during this whole process you’re doing lots of archives (for our newbies, in PAC Control config mode, go to: File > Archive Strategy). This is in case you want to go back to a previous version for any reason.
I hope that helps or at least gives y’all something to ponder and comment on.
Write on!
-Mary
P.S. - If you ever go to delete a tag that is not found in the strategy anywhere, yet has a non-zero Ref Count, use this process to make PAC Control re-calculate all Ref Counts:
- Click in the Strategy Tree to make it the active window.
- Press CTRL+R.
- Choose Compile > Compile All.
- Choose File > Save All.
The strategy database is rebuilt and the reference counts should be correct.