stefandreyer / CODESYS-MQTT

MQTT client library for CODESYS, supporting all QoS
MIT License
109 stars 24 forks source link

I Can't publish any payload #57

Closed abaubi closed 1 year ago

abaubi commented 2 years ago

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

stefandreyer commented 2 years ago

Hi,

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

Please let me know if this works.

BR Stefan

abaubi commented 2 years ago

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.

stefandreyer commented 2 years ago

hi,

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

BR Stefan

abaubi commented 2 years ago

Hi Stefan,

That was. It's working now,.

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

jshroyer031 commented 2 years ago

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

stefandreyer commented 2 years ago

Hi jshroyer031

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

BR Stefan