Load Recipe Subroutine


#1

LoadRecipe.zip (6.62 KB)

Hello all, I have been needing a subroutine that would load standard Opto22 recipes for some time now (see this post) and finally got around to building one. So I thought I would share.

This sub will load standard Opto22 recipes and some slightly non-standard recipes. Non-standard features that can be turned on are custom EOF’s and the ability to skip over invalid lines (more info in the sub).

Additionally, the sub can be configured to load the recipe by entire file or line by line. Load by file is much faster but if your recipes are large, you may run out of memory while adjusting the input string table to hold that large recipe. For me, our recipes are so large that load by file is not an option.

I have done basic testing and currently use this sub in production. But please test it for yourself and provide feedback if you have any issues!

Thanks


#2

Added the following to the subroutine:

  • Return error on invalid chart instruction
  • Added subroutine status variable. Useful if you want a “downloading” indication on your HMI. If you know the size of your recipes you could increment this variable in the sub and create a “percent complete” type graphic on your hmi.

#3

Sounds promising. It’s a pac pro developed sample though FYI.