CODESYS-MQTT
CODESYS-MQTT copied to clipboard
I Can't publish any payload
Hello
I can't publish any payload. I'm using Codesys Control Win x64 device on windows 10 to test this MQTT library.
I configured MQTT Client, Subscribe and Publish. I got Client connection and Subscribe to work fine but Publish is still not working. I set Publish send input at true and sendactive and a few later sendtimeout are at true state.
I tested the example testoutoftheboxnotls and it's happening the same.
Any help?
Thanks
Hi,
you have to use the ClientFB instance in your MQTT_IN_OUT var.
Please let me know if this works.
BR Stefan
Hi, Stefan thanks for your fast answer.
I'm not sure if I understand what you told me. I'm setting MQTT_IN_OUT:=PLC_PRG.MQTT_IN_OUT, that is used in MQTTClient FB, in subscribe and publish FB's as you can see in attachments captures. Subscribe is working but Publish is not working. I'm following example testoutoftheboxnotls using similar code in ladder.
I tried to compile MQTTPublish_0.SetMqttInOut(MQTT_IN_OUT:=PLC_PRG.MqttClient_0.MQTT_IN_OUT); but is compiling with errors.
I attached you the project archived if you could check it out.
Thanks for your help.
hi,
i mean a call like this:
let me know if this works
BR Stefan
Hi Stefan,
That was. It's working now,.
Thanks so much for your help and for your great job.
Stefan,
Can you send me the latest MQTT library that is functional?
Jordan
On Thu, Apr 21, 2022 at 6:06 PM abaubi @.***> wrote:
Hi Stefan,
That was. It's working now,.
Thanks so much for your help and for your great job.
— Reply to this email directly, view it on GitHub https://github.com/stefandreyer/CODESYS-MQTT/issues/57#issuecomment-1105807349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZITE7UP65AOGBYTCUAVQDVGHGPLANCNFSM5T3JHQSA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi jshroyer031
you can use 1.2.0.6 from this repo, its the last I developed.
BR Stefan