CODESYS-MQTT icon indicating copy to clipboard operation
CODESYS-MQTT copied to clipboard

I Can't publish any payload

Open abaubi opened this issue 2 years ago • 6 comments

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

abaubi avatar Apr 20 '22 08:04 abaubi

Hi,

you have to use the ClientFB instance in your MQTT_IN_OUT var.

Please let me know if this works.

BR Stefan

stefandreyer avatar Apr 20 '22 16:04 stefandreyer

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.

abaubi avatar Apr 20 '22 19:04 abaubi

hi,

i mean a call like this: image let me know if this works

BR Stefan

stefandreyer avatar Apr 21 '22 17:04 stefandreyer

Hi Stefan,

That was. It's working now,.

Thanks so much for your help and for your great job.

abaubi avatar Apr 21 '22 22:04 abaubi

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: @.***>

jshroyer031 avatar Apr 21 '22 22:04 jshroyer031

Hi jshroyer031

you can use 1.2.0.6 from this repo, its the last I developed.

BR Stefan

stefandreyer avatar Apr 22 '22 06:04 stefandreyer