Hi to all!
I'm in need of some advice or even example of using DB number as argument for loop. Language: SCL. PLC: S7-1200. Soft: TIA V13.
More details on the task:
- I have 3 similar DBs in WORK memory created on base of UDT (that is array)
- I'm planing something near 300 similar DBs located just in LOAD memory (for logging purposes)
- Program logic is simple : writing records to WORK DBs arrays sequentially (DB1..DB2..DB3), when DB3 starts program is copying DB1 to DB1_L (to LOAD memory), when DB1 starts again (writing is cyclical) - DB2 to DB2_L ... and so on.
- Copying to LOAD memory made with WRIT_DBL function.
- When logged data requested, it is copied from LOAD memory to some other buffer DB (not the point) by READ_DBL.
As you can see, there is constant change of Source and Destination DBs in WRIT_DBL/READ_DBL functions. They are taking _variant_ parameters for both input and output. If just someone can tell me how to make _variant_ variable for temporary DB pointing... ... or suggest any other solution. By the way, I'm trying to use "Optimised" DBs.
Thanks in advance!
I'm in need of some advice or even example of using DB number as argument for loop. Language: SCL. PLC: S7-1200. Soft: TIA V13.
More details on the task:
- I have 3 similar DBs in WORK memory created on base of UDT (that is array)
- I'm planing something near 300 similar DBs located just in LOAD memory (for logging purposes)
- Program logic is simple : writing records to WORK DBs arrays sequentially (DB1..DB2..DB3), when DB3 starts program is copying DB1 to DB1_L (to LOAD memory), when DB1 starts again (writing is cyclical) - DB2 to DB2_L ... and so on.
- Copying to LOAD memory made with WRIT_DBL function.
- When logged data requested, it is copied from LOAD memory to some other buffer DB (not the point) by READ_DBL.
As you can see, there is constant change of Source and Destination DBs in WRIT_DBL/READ_DBL functions. They are taking _variant_ parameters for both input and output. If just someone can tell me how to make _variant_ variable for temporary DB pointing... ... or suggest any other solution. By the way, I'm trying to use "Optimised" DBs.
Thanks in advance!