Function useSerial

  • Subscribe to a Serial signal provided by the CrComLib. The signal is provided as an object with a value property that is a $state rune. An optional set property is provided to set the value of the signal. When specified, setting the value rune will write to the control system. This is useful when biding the signal to a field or component.

    Parameters

    • fbSignal: string

      Signal name in contract file, or join number as a string to receive feedback from.

    • OptionalsetSignal: string

      Signal name in contract file, or join number as a string to send a value to. If not provided, the feedback signal will be used.

    Returns { get value(): string; set value(v: string): void }