LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect display format using for-loop

Solved!
Go to solution

Hi,


I have a numerical array using an hexadecimal display format that is autoindexed by a for-loop. Within the for-loop each single value is passed to a sub-VI that needs the hexadecimal display format. Unfortunately, the indexing doesn't keep this hex-format but transfers it back to a decimal format.

 

Any idea how to solve this?

 

Thank you in advance and best regards

 

Simon

 

Download All
0 Kudos
Message 1 of 5
(2,713 Views)

The formatting is a cosmetic property of the control or indicator. The value is independent of the formatting. If you want to display a value in hex format, all you need to do is change the display format of that particular front panel element.

 

(If the subVI requires a different datatype (e.g. binary string or hexadecimal formatted string), you need to give us more detail. What does the subVI do? Can you show the subVI too?)

0 Kudos
Message 2 of 5
(2,702 Views)

The subVI reads values from a plc using adsocx. It needs an indexgroup value and an indexoffset value both of them as a numerical values in hexadecimal format.

Attached you find a subVI to read integer values.

0 Kudos
Message 3 of 5
(2,690 Views)

Both inputs are just plain I32 numerics. The display format is irrelevant for this.

0 Kudos
Message 4 of 5
(2,642 Views)
Solution
Accepted by topic author simon-b

Thank you for this hint. The problem was another subVI where I created the num-array which afterwards goes in the for-loop. There, all numerical elements where set to I16 instead of I32. The plc could not handle these wrong values, thus I got nonsense.


Thank you for your quick replies!

 

0 Kudos
Message 5 of 5
(2,593 Views)