LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Json Print using bartender integration

Hello Team,
I am new to LabVIEW, and I am building a VI that handles label printing via a Bartender API integration.
Whenever I run the VI, it crashes with a "no memory to perform the operation" error, followed by an HTTP buffer error.
It seems like the buffer is filling up or a reference is staying open in memory. How can I properly flush the HTTP buffer and free up memory between print jobs?
Any advice or best practices would be greatly appreciated. Thanks!
 

 
 
0 Kudos
Message 1 of 7
(566 Views)

I also got the "no memory" error from time to time, but always due to some wrong input parameters - in any case never using HTTP vi's. Can you speciify what parameters you are using? Also, in which state do you get this error?

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 7
(413 Views)

One of your messages shows a timeout. I guess since you are manually formatting your JSON, the message is malformed. Try again with JSONtext library. It'll save you a lot of headaches in the future.

0 Kudos
Message 3 of 7
(397 Views)

@Basjong53 wrote:

One of your messages shows a timeout. I guess since you are manually formatting your JSON, the message is malformed. Try again with JSONtext library. It'll save you a lot of headaches in the future.


The obvious thing is that it is doing a lot of roundabout work to create the JSON body. And this method includes tabs in the JSON output, which according to the JSON standard should be legit whitespace but nevertheless is superfluous.

 

This

 

rolfk_0-1789228017988.png

 

could be easily replaced:with:

 

rolfk_1-1789228539966.png

Of course using the JSONtext library from Dr. James Powell is actually an even better solution.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 7
(359 Views)

Hi,

    I just changed some modification still im getting this error


LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001<APPEND><b>Complete call chain:</b> LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001 JSON_Print.vi main vi2.vi

0 Kudos
Message 5 of 7
(228 Views)

@Naveenok96 wrote:

Hi,

    I just changed some modification still im getting this error


LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001<APPEND><b>Complete call chain:</b> LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001 JSON_Print.vi main vi2.vi


That is not an error, that is just the call chain. 

You need to read the error information and the number. 

 

My bet is that you url is not correct, or that the PC you test your code on does not have access to the server/system that tries to connect to. 
You need to make some debug of your code. 
Find out if all your inputs to the POST vi has the correct values.   

0 Kudos
Message 6 of 7
(206 Views)

@dkfire wrote:

@Naveenok96 wrote:

Hi,

    I just changed some modification still im getting this error


LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001<APPEND><b>Complete call chain:</b> LabVIEWHTTPClient.lvlib:POSTBuffer.vi:6120001 JSON_Print.vi main vi2.vi


That is not an error, that is just the call chain. 

You need to read the error information and the number. 

 

My bet is that you url is not correct, or that the PC you test your code on does not have access to the server/system that tries to connect to. 
You need to make some debug of your code. 
Find out if all your inputs to the POST vi has the correct values.   


Along with this, if it were me, I'd create a small VI and recreate your request, then send it to us if you still get an error. We can't debug images.

0 Kudos
Message 7 of 7
(174 Views)