LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single string tag expanded into 100 plc register values

I found a way to read 100 registers of plc data with a single string tag, if you can guarantee that none of the plc registers are zero. A register value of zero acts like a Null ascii terminator and truncates the string. Define the string tag as 200 bytes and uncheck the text data only box. Use the code in the attached picture to convert the string bytes back into decimal register values.
Message 1 of 4
(2,911 Views)
Ins't that code exactly the same as typecasting to an U16 Array?

Message Edited by altenbach on 05-19-2005 07:24 AM

Message 2 of 4
(2,907 Views)
Yep, that works also and is simpler code. I haven't used the typecasting feature. Do you think 20 strings tags vs. 2000 register tags will be easier on the tag engine??
0 Kudos
Message 3 of 4
(2,892 Views)
Sorry, I'm not familiar with "tags". I was just commenting on the posted code. Hopefully someone else will chime in. 😉
0 Kudos
Message 4 of 4
(2,884 Views)