12-15-2013 03:31 AM
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
Solved! Go to Solution.
12-15-2013 03:43 AM
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?)
12-15-2013 04:05 AM
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.
12-15-2013 11:04 AM
Both inputs are just plain I32 numerics. The display format is irrelevant for this.
12-16-2013 05:10 AM
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!