Hello,
I am currently forced to use s7-1200 (6ES7214-1AG40-0XB0) PLC for one small project. I do have some experience with S7-300/400 mostly in STL (+Step7), which is (sadly) not available on S7-1200.
Here is my problem:
- I have a Data Block in which AIN_UDT(s) are placed, the DB is structured as follows:
DB_AIN
AIN_001_TemperatureRoom1
AIN_002_TemperatureRoom2
...
AIN_XXX_XXX
- I do not use array because I need to see AIN name (AIN_001_TemperatureRoom1) in the program
- I would like to have a Function (FC), which will do the AIN processing
- My idea is to use SCL and have a for cycle, something like this:
FC_AINProcessing
Temp AIN_temp of type AIN_UDT
For i:=0 to NUMBER_OF_AINS
// copy UDT from DB_AIN to AIN_temp
// do the proccesing (limits, alarms, ...)
// copy AIN_tmp back to DB_AIN
End For
Sadly I am not able to make it work (on S7-300/400 with STL it is really simple...). Can you, please, help me with this / recommend some good manual describing indirect addressing in SCL...?
Thanks in advance!
I am currently forced to use s7-1200 (6ES7214-1AG40-0XB0) PLC for one small project. I do have some experience with S7-300/400 mostly in STL (+Step7), which is (sadly) not available on S7-1200.
Here is my problem:
- I have a Data Block in which AIN_UDT(s) are placed, the DB is structured as follows:
DB_AIN
AIN_001_TemperatureRoom1
AIN_002_TemperatureRoom2
...
AIN_XXX_XXX
- I do not use array because I need to see AIN name (AIN_001_TemperatureRoom1) in the program
- I would like to have a Function (FC), which will do the AIN processing
- My idea is to use SCL and have a for cycle, something like this:
FC_AINProcessing
Temp AIN_temp of type AIN_UDT
For i:=0 to NUMBER_OF_AINS
// copy UDT from DB_AIN to AIN_temp
// do the proccesing (limits, alarms, ...)
// copy AIN_tmp back to DB_AIN
End For
Sadly I am not able to make it work (on S7-300/400 with STL it is really simple...). Can you, please, help me with this / recommend some good manual describing indirect addressing in SCL...?
Thanks in advance!