10-19-2006 11:04 AM
10-19-2006 11:14 AM
10-25-2006 07:16 AM
Hello,
I have "right clicked" everywhere on the case block and was not able to find a way to change the radix. I am suspecting that because the case selector is a string that I cannot change the radix to a hex or numerical value.
10-25-2006 07:39 AM
09-24-2007 03:30 AM
Hi.
I met the same problem in my project.I followed that way,and it did work.
There is a tip that have to be noticed.That is when you entering hex values for Case Selector,the selector think the input data as the decimal data.So what you have to do is change the converted data to the original data(hex values).
thanks!
LabVIEW 7.1 on XP
09-24-2007 10:17 AM
@WangX wrote:
There is a tip that have to be noticed.That is when you entering hex values for Case Selector,the selector think the input data as the decimal data.
Sorry, I do not understand your tip.
How do you wire "hex values" to a case selector? Are you talking about integers? Binary strings? Formatted strings?
@WangX wrote:
So what you have to do is change the converted data to the original data(hex values).
What is "converted data"? What is "original data?" What do you use to "convert"?
You should attach an image or VI to make it clear what you actually mean. 🙂
09-25-2007 12:16 AM
Hi,altenbach
I am not good at english,sorry about that.
I will try to make it more clearly.
altenbach wrote:
How do you wire "hex values" to a case selector? Are you talking about integers? Binary strings? Formatted strings?
"wire hex values to a case selector" actually means connecting a hex data with a case selector. And that is a integer.
"1.GIF" shows that how does the case selector receive data from "Message". And of course, the type of "Message" is Hex.
The value is "8701". However, the radix of this case is "Decimal". So, this case is not gotta to work correctly.
In "2.GIF", I changed the radix to "Hex". But the selector think of input data(Message) as decimal data. And convert it to Hex automatically.
"8701" ->" x21FD". "8701" actually is not decimal data. So, this case is not gotta to work correctly neither.
In order to solve this problem, I changed the value of "x21FD" to "x8701" manually. See "3.GIF". And It works.
Thanks.
09-25-2007 12:40 AM
You seem to confuse the data of the wire. It is a plain 2byte integer. (there is no distinction between hex or decimal, formatting is just a cosmetic property of an indicator connected to the wire and does not change the underlying data).
Again, setting the radix of a case structure is only cosmetic and for convenience.
If the wire contains x21FD it is the same as saying the wire contains d8701 or b0010000111111101, it is just displayed differently. You can either set the case to decimal and enter 8701 or set the case to hex radix and enter 21FD or even set the case to binary radix and enter 10000111111101. It will all match the same way.
If you case matches x8701, it means that your decimal data is actually 34561. Simple as that. 🙂