[?]: Functions to repeat instructions for ET stations

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
mayank
Posts: 1
Joined: Sat May 06, 2017 7:49 am

[?]: Functions to repeat instructions for ET stations

Post 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!
CoMod
Site Admin
Posts: 3992
Joined: Thu Feb 16, 2006 3:25 pm
Location: Russia

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

Post by CoMod »

Code: Select all

---|Button|-------------(Lamp)
dehell
Posts: 104
Joined: Sat Jun 13, 2009 12:25 pm
Location: Europe

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

Post 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.