<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/</id><updated>2021-07-19T15:45:41.653000Z</updated><subtitle>Recent posts to MQTT Pointer to Byte Help </subtitle><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#d14f" rel="alternate"/><published>2021-07-19T15:45:41.653000Z</published><updated>2021-07-19T15:45:41.653000Z</updated><author><name>nothinrandom</name><uri>https://forge.codesys.com/u/nothinrandom/</uri></author><id>https://forge.codesys.com34b9b2084849a8f83788a36c179792318f596e4d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/jebates31/"&gt;@jebates31&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;You are probably still missing the udiMaxPayloadSize parameter.  From the screenshot, it is set to 0, so it is expecting an empty string.  You could do something like:&lt;br/&gt;
1) udiMaxPayloadSize := SIZEOF(_sMyTestString);&lt;br/&gt;
2) udiMaxPayloadSize := 35; // some fixed string length that would cover your test case&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#8d48" rel="alternate"/><published>2021-07-19T15:13:09.681000Z</published><updated>2021-07-19T15:13:09.681000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.come4e315deb9b34977bbe25681a797804690df351e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;please see the example project at C:\Users\user-who-installed-package\MQTT Client SL\1.0.2.0&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#e6a5" rel="alternate"/><published>2021-07-19T14:47:14.762000Z</published><updated>2021-07-19T14:47:14.762000Z</updated><author><name>jebates31</name><uri>https://forge.codesys.com/u/jebates31/</uri></author><id>https://forge.codesys.com0c8e18fff2219c4128e0e9fa89c99f8be54a812c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, I originally tried to do this and I keep getting an error showing the Allocated Payload size has been exceeded. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#ccbf" rel="alternate"/><published>2021-07-19T14:47:12.059000Z</published><updated>2021-07-19T14:47:12.059000Z</updated><author><name>jebates31</name><uri>https://forge.codesys.com/u/jebates31/</uri></author><id>https://forge.codesys.com487edfd21cca7410e6feb06b238180b0e996c337</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, I originally tried to do this and I keep getting an error showing the Allocated Payload size has been exceeded. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#c18e" rel="alternate"/><published>2021-07-19T14:40:39.307000Z</published><updated>2021-07-19T14:40:39.307000Z</updated><author><name>nothinrandom</name><uri>https://forge.codesys.com/u/nothinrandom/</uri></author><id>https://forge.codesys.comc90788593022bf217f671e397ba78a41ae7a093b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/jebates31/"&gt;@jebates31&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Pointer means that you need to get the memory address that stores the data.  This can be done using the ADR instruction, so in your case you could do things like:&lt;br/&gt;
1) reading from a string variable like pbPayload := ADR(_sMyTestString)&lt;br/&gt;
2) reading from a static string variable like pbPayload := ADR('My Test String')&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MQTT Pointer to Byte Help </title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c9a34afff/?limit=25#9fc4" rel="alternate"/><published>2021-07-15T20:41:05.765000Z</published><updated>2021-07-15T20:41:05.765000Z</updated><author><name>jebates31</name><uri>https://forge.codesys.com/u/jebates31/</uri></author><id>https://forge.codesys.comcc3c32055419b597ca1c643cfe5159c78d8206f3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I am working on a MQTT program but need some help with a function block. I have the Client block connected to the broker with the Topics communicating but i can't figure out how to publish or subscribe. I am not sure what to put in to the pbPayload? I am expecting a string value but it looks like it is a Pointer_TO_Byte?? I am still pretty new with Codesys and haven't used this data type before. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>