> For the complete documentation index, see [llms.txt](https://doc.open-tx.org/opentx-2-3-lua-reference-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.open-tx.org/opentx-2-3-lua-reference-guide/part_iii_-_opentx_lua_api_reference/model-functions-less-than-greater-than-luadoc-begin-model/getlogicalswitch.md).

# model.getLogicalSwitch(switch)

Get Logical Switch parameters

@status current Introduced in 2.0.0

## Parameters

* `switch` (unsigned number) logical switch number (use 0 for LS1)

## Return value

* `nil` requested logical switch does not exist
* `table` logical switch data:
  * `func` (number) function index
  * `v1` (number) V1 value (index)
  * `v2` (number) V2 value (index or value)
  * `v3` (number) V3 value (index or value)
  * `and` (number) AND switch index
  * `delay` (number) delay (time in 1/10 s)
  * `duration` (number) duration (time in 1/10 s)
