04-06-2021 07:06 AM
Not Kyle, but I'll take a shot anyway...
What exactly did you put in the string control?
If you write something like
<inArgs><scannerID>12345</scannerID></inArgs>
you might have some luck (where 12345 is the "scannerID" value).
In this case, a snippet showing the front panel would have been useful so we could see - block diagram constants are a good choice for forum debugging since then we can see code + inputs.
Please note that a snippet isn't the same as a screenshot - you can create snippets using the menu path Edit > Create VI Snippet.
04-06-2021 03:31 PM
Hi
Is there any specific method to write code in XML string constant. JKI Xml tool kit is effective to write the code?
Thanks in advance.
04-10-2021 11:39 AM
Hi
Is there anyone to help me? How I can apply XML file as input to the labview?
I tried to convert the string input to XML file. . And I received the string output as given in the attached image. But it didn't work. If someone has a relevant example, please share it with me.
I will appreciate any reply.
Regards and Thanks.
04-11-2021 03:54 AM
The problem in the examples you've shown is that you have bits like "scannerId.ToString()". This is a C# method call to convert the scannerID (a number, presumably) to a string, so that you can put it in your XML (as a string).
The equivalent LabVIEW code would be something like this:
I usually prefer the use of Format Into String for building commands/argument strings, but you can also do it piece by piece with e.g. Concatenate Strings and Number to Decimal String.
04-12-2021 12:51 PM
Hi Cbutcher,
Thanks for this code. I tried JKI easy xml and generated the XML.
Plaese take a look. Is it Ok.
04-13-2021 04:31 AM
@Matharoo wrote:
Hi Cbutcher,
Thanks for this code. I tried JKI easy xml and generated the XML.
Plaese take a look. Is it Ok.
That looks fine based on my "from this forum only" level of understanding regarding your problem.
My previous post gave a way that didn't require toolkits, but of course if your real code/structure is more complicated than just a few tags then using something like the JKI toolkit is a sensible choice that will make your code clearer (hopefully)!
That's especially true if you populate the cluster in various locations, or make use of the component parts, etc.