Skip to product information
1 of 1

Bistable relay

Regular price €3,90 EUR
Regular price Sale price €3,90 EUR
Sale Sold out
Description

The FB_ToggleOnEdge function block switches internally between two states whenever a rising edge of an input signal ( #Coil_A1 ) is detected. NO and NC contacts are controlled according to the toggling state and the input signals. The block supports reset, deactivation, and a simulation mode, as well as basic error flagging.

Note: This logic serves as a template. It must be integrated, reviewed, and approved by qualified personnel before productive use. Improper integration may result in unexpected behavior.

How it works
Reset

Resets the internal toggle state and outputs. Errors are cleared and the status is set accordingly.

Disabled

If #Enable is not active, toggles and outputs are disabled and an error is reported. The previous state of the input is retained so that it continues to function correctly upon reactivation.

simulation

In simulation mode, the internal toggle state is toggled whenever an input ( #Coil_A1 ) is set, without actual edge detection. The NO/NC outputs follow this simulated state. The status indicates simulation mode.

Edge detection

The block detects rising edges of #Coil_A1 based on the stored previous state ( #LastCoilState ) and toggles #ToggleState only on such an edge.

Output logic

The NO/NC contacts are set depending on the input and the current toggle state:

  • #Klemme14 := #Klemme13 AND #ToggleState – NO active if input AND Toggle are set
  • #Klemme22 := #Klemme21 AND NOT #ToggleState – NC active on input and inverted toggle

Errors are reset, the status is OK.

Technical details
  • Inputs: #Enable , #Reset , #SimMode , #Klemme13 , #Klemme21 , #Coil_A1
  • Outputs: #Klemme14 (NO), #Klemme22 (NC)
  • Internal state: #ToggleState (toggle state), #LastCoilState (for edge detection)
  • Status & Diagnosis: #Error , #Status , #DiagnosticCode
Possible applications
  • Control of changing switching states when a key is pressed or pulses with edge detection
  • Simulation of switching behavior for validation without real switching operations
  • Linking of normally closed/normally closed contacts for visible state changes
  • Integration into diagnostic chains for traceability of switching events

Note: A complete technical inspection and approval by qualified personnel is required before productive use.

compatibility
  • Siemens S7-1200 & S7-1500 controllers
  • Suitable for TIA Portal with SCL support
  • Integration into higher-level control processes possible
  • Simulation mode allows pre-testing without real outputs
Scope of delivery

You will receive:

  • An SCL file with implemented function block
  • Clear declaration of all inputs and outputs
  • Annotated structure for quick adaptation
  • Quick guide to integration

The download link will be provided after purchase.

Support

I am happy to support you with:

  • Adjusting the edge and toggle logic
  • Integration into higher-level processes or HMI
  • Interpretation of status and diagnostic information
  • Special adaptations for your application

Contact is possible via shop message or email. Extensions are available as optional customizations.