====== Switch Block - Desired Value Switcher ====== {{:cs:mervis-ide:35-help:switcherblockvalue.png}} ==== Full Name ==== Lib.Mervis.v1_0.SwitcherBlockValue ==== Required Project References ==== * Lib.Mervis ===== Description ===== A helper block used, in combination with a switch block, for switching the desired value. ===== Usage in ST ===== program test var switcherblock: lib.mervis.v1_1.SwitcherBlock; switchervalue: lib.mervis.v1_0.SwitcherBlockValue; end_var switcherblock(); switchervalue(CompositeState := switcherblock.CompositeState); end_program ===== Example Usage in FBD ===== {{:cs:mervis-ide:35-help:switcherblockvalue_usage.png}} ===== Inputs ===== |Name |Data Type|Retain|Mandatory Connection |Meaning| |Demand |real |No |Yes |Desired value in automatic mode | | |CompositeState|uint |No |Yes |Output //CompositeState// from the control [[SwitcherBlock_v1.1.htm|switch block]]| | |OffDemand |real |No |No |Demand value in the off state | | |ManualDemand |real |Yes |No |Desired value when manually turned on | | ===== Outputs ===== |Name |Data Type|Meaning| |Command|real |Command| ===== Detailed Function Description ===== The block is used for selecting the control value when switching a device (e.g., a continuous demand for a frequency converter). If the device (or its switch block) is in automatic mode and has an operational demand, the //Demand// input value is copied to the //Command// output. In the case of manual activation, the //ManualDemand// value is copied to the //Command// output. In the off state (no demand or the device is manually turned off), the //OffDemand// value is copied to the //Command// output.