Hi All
Basically we supplied a machine with a fixed set of parameters for 99 different possible vessels (it is a washer, and yes, we told the customer it was a bad idea)
Now, it has been identified that we need a crude recipe system. I already have a global DB which is the existing setpoints. However the DB also has lots of other items scattered in it such as timer elapsed values, status messages etc.
I was asked TODAY to write some code to fix it for testing onsite TOMORROW..... typical bs etc.
Anyway I exported the global DB and stripped out the parameters (approx. 80) , then copied this to 99 DB's, 1 for each vessel. I know I could have used a UDT but time was limited
The data is a mix of INTs and REALs.
I have written a set of 5 FC's which are basically IF Product1 THEN load parameters for Product1 to the original working DB through to 99 and used a offset in the HMI tag to point to the new Product DB for the data read/write
If I was doing this from the ground up I would probably have used SFC20 and kept the parameters separate.
Would have been so simple if I could have kept the DB[number] style
Will check back here later when at home
Cheers