From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting a hexadecimal string to ASCII-characters.

Hi VitEm,

 

"I'm not sure, if my parser is optimal."

- Surely not, that FOR loop can be optimized - maybe it isn't needed at all.

- Instead of the formula node I would use a case structure.

- Attach real VIs when you want optimizations by others.

- Give a good description of how that string should be parsed...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 14
(750 Views)

Hi Gerd,

 

"- Surely not, that FOR loop can be optimized - maybe it isn't needed at all."

yes-yes-yes and yes! I'm also trying to avoid the "for loops", but in this case a small loop was my conscious compromise.


"- Instead of the formula node I would use a case structure."

I did it, while in next step it was desired to manage more than 25 cases! But in the my new variant I realized all based on the "case machine pattern". I must denote: the new parsing paradigm is a help of one professional LabView expert.

 

"- Attach real VIs when you want optimizations by others."

No problem! I would gladly do it, cause now I have big trouble to manage the huge number of cases. 


"- Give a good description of how that string should be parsed..."

I could'nt do it better, than own Data Format Description from DMM manufacturer.

 

Please take a look on attachments.

 

 

Download All
0 Kudos
Message 12 of 14
(743 Views)

Hi VitEm,

 

why don't you use the parser that you already have in the VI attached to your last message? It looks much better than your try...

 

I would replace the case structure in the VI by a string array constant holding all measurement descriptors and a simple IndexArray to index the corresponding descriptor...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 14
(734 Views)

Dear Gerd,

 

I've had VISA troubles with it today morning. Surely, there is only another variant to interpret the DMMs answer well.

I thought about it, more then one it could be replaced with a small config file, witch have to be loaded at the VI start. But I wrote: today morning I tried the new paradigm to test these advantages. It's dynamical, flexible and works more stable, then mine.

0 Kudos
Message 14 of 14
(728 Views)