Page 1 of 1

[?]: Functions to repeat instructions for ET stations

Posted: Sat May 06, 2017 8:13 am
by mayank
Hello everyone,

I have just started learning about PLCs as a hobby. I have prepared following setup,

Main Controller
Controller: S7-1200
Inputs: Push Buttons (x2) (turns a lamp connected at ET station on and off)
Output: None

ET Station
ET: ET200S
IM: IM 151-3
Inputs: None
Outputs: Lamp

Main controller and ET stations are connected through PROFINET. When the buttons are pressed at Main Controller, the lamps at ET stations are turned on or off.

Question: I was thinking that if I were to add more ET stations in a daisy chain manner, is there a possibility to make just one function to turn on/off the lamp and based on the parameter passed to the function, it decided with I/O tag to refer to.

I apologise if the question is not clear, please let me know if so and I will try to explain it in a better way.

Thanks!

Re: [?]: Functions to repeat instructions for ET stations

Posted: Sat May 06, 2017 9:35 am
by CoMod

Code: Select all

---|Button|-------------(Lamp)

Re: [?]: Functions to repeat instructions for ET stations

Posted: Wed May 10, 2017 1:33 pm
by dehell
Hello,
Use indirect adressing, for S7-1200, take a look at peek and poke instruction.
https://support.industry.siemens.com/cs ... 0&lc=en-WW
Best regard.