Instrukcja Assignment w Programowaniu

Share
Instrukcja Assignment w Programowaniu

Możesz użyć instrukcji „Assignment” do ustawienia bitu określonego operandu. Jeśli wynik operacji logicznej (RLO) na wejściu cewki ma stan sygnału „1”, określony operand jest ustawiany na stan sygnału „1”. Jeśli stan sygnału wynosi „0” na wejściu cewki, bit określonego operandu jest resetowany do „0”.

Instrukcja nie wpływa na RLO. RLO na wejściu cewki jest przesyłane bezpośrednio do wyjścia.

Parametr

W poniższej tabeli przedstawiono parametry instrukcji „Assignment”:

ParametrDeklaracjaTyp danychObszar pamięciDescription
<Operand>WyjścieBOOLI, Q, M, D, LOperand, do którego przypisywane jest RLO.

Example

Poniższy przykład pokazuje, jak działa instrukcja:

AD 4nXevK86PhkKbijUmKDPDhDXXDZfErYc5iYeLNg9HXnClJF4 xvaRwIArir5DCCGQ3mhXXg1YcuSx4 Z3yJW14KGAQJHBBiWfBtBC5V373 7NPN9bBdrDaEfw 2zCUlXUmfIU74P O0aSO7

Operand „TagOut_1” jest ustawiany, gdy spełniony jest jeden z poniższych warunków:

  • Operandy „TagIn_1” i „TagIn_2” mają stan sygnału „1”.
  • Stan sygnału operandu „TagIn_3” wynosi „0”.

Operand „TagOut_2” jest ustawiany, gdy spełniony jest jeden z poniższych warunków:

  • Operandy „TagIn_1”, „TagIn_2” i „TagIn_4” mają stan sygnału „1”.
  • Stan sygnału operandu „TagIn_3” wynosi „0” i stan sygnału operandu „TagIn_4” wynosi „1”.

If you would like to enhance your knowledge and skills in programming and configuration of automation systems, we recommend enrolling in the free PLC course! Sprawdź także naszą instrukcję wideo:

bezplatny s7 1200
Share
Recommended course!
Until 20.09.2022 rebate -15% on:

SIMATIC S7 in action

Sign up for the newsletter!
Author of entries
Tomasz Gilewski

Hello, my name is Tomasz Gilewski. I am the author of books on the S7-1200 controller and HMI panels (i.e. Siemens hardware). I have been programming exclusively on Siemens hardware and engineering tools for several years.

Leave a Comment

Select currency