Announcement

Collapse
No announcement yet.

MQTT String Change to Trigger Power Flow?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BobO
    replied
    Originally posted by belias View Post
    For some reason I thought MQTT had to write to an SS block. Perfect solution...thank you!
    It was originally string only for the output, but we extended it to target numerics. That was always part of the plan, but we weren't totally sure how it would get used, so we simplified to string only initially until we got more feedback from users.

    Leave a comment:


  • belias
    replied
    For some reason I thought MQTT had to write to an SS block. Perfect solution...thank you!

    Leave a comment:


  • BobO
    replied
    If the payload is numeric, you don't need the STR2REAL. Just put the real parameter in MQTTSUB.

    Leave a comment:


  • belias
    started a topic MQTT String Change to Trigger Power Flow?

    MQTT String Change to Trigger Power Flow?

    Hello,

    Is there a way to trigger power-flow based on a string change or an MQTT message received? In other words, I'm using an MQTT input to trigger the PLC to change a bit.

    Right now, I'm doing something like this:


    Rung 1: ST1 --> MQTTSUB (puts topics into SS payloads)
    Rung 2: ST4 --> STR2REAL (gives a real numeric value)
    Rung 3: (Delta Contact) --> Action


    It feels like this is a very inefficient method, since it requires a constant 1-second scan at Rung 2 to pick up any changes.

    Is there a way to initiate power-flow based on a change to either the MQTT topic, or to the payload string?


    Thanks!
Working...
X