Support Forums
Publishing int value with MQTT client

Trying to input an analog value in a numeric entry box with 1 decimal place and publish over MQTT. Everything works fine but if the data entry is done wrong (entering a .xx value) the publish fails on the receiving PLC end. I limit the numeric entry box to 1 decimal and it displays properly in the the box (enter a number xx.xx and only xx.x rounded up is shown), but in the MQTT world as soon as ENTER is pushed after the change to the numeric input box is made VTSCADA publishes the xx.xx value.

I tried using the box as a memory tag only and then rereading the value to a IO calculation tag to send to MQTT hoping the value displayed in the numeric entry box would come through but it also works off of the ENTER command in the numeric entry box.

Any suggestions to limit the characters in the numeric box and then Publish to MQTT?

Trying to input an analog value in a numeric entry box with 1 decimal place and publish over MQTT. Everything works fine but if the data entry is done wrong (entering a .xx value) the publish fails on the receiving PLC end. I limit the numeric entry box to 1 decimal and it displays properly in the the box (enter a number xx.xx and only xx.x rounded up is shown), but in the MQTT world as soon as ENTER is pushed after the change to the numeric input box is made VTSCADA publishes the xx.xx value. I tried using the box as a memory tag only and then rereading the value to a IO calculation tag to send to MQTT hoping the value displayed in the numeric entry box would come through but it also works off of the ENTER command in the numeric entry box. Any suggestions to limit the characters in the numeric box and then Publish to MQTT?
27
0
1
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft