LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LDF Starter Kit problem

Hi All,

I am using the LDF starter kit to parse an LDF file using LV 7.1

 

I have encountered a problem with the vi "LDF Check Number.vi" as attached.

Why does the 9th value cause the Case statement to return the default value even though the statement should accept 0-9 ?

 

This causes a problem for the 9th value for a signal in an LDF file as it uses the default instead of the value put in.  

 

 

 

 

0 Kudos
Message 1 of 3
(2,579 Views)
Hi Mike, I have had a look at your code and it does behave quite strangely.  This appears to be a problem caused when using both a string as an input to the selector of your case structure, and using a “within range” case.  One potential solution to the problem is if you create seperate case statments for each of the values (0-9) instead of using a single statment then the VI functions as expected.  Alternatively if the input to the case selector was numeric the case would function as expected.  Additional code would be required to check if the string was a number, and then convert the string to a numeric.Hope this helps,John PorterAE
NI
------
John.P | Certified LabVIEW Architect | NI Alliance Member
0 Kudos
Message 2 of 3
(2,539 Views)

Hi John,

 

Thanks for the reply, I reposted this query later in the CAN and DeviceNet section of the forum ( where I should have put it in the first place ! ), and it seems that its a small bug in the VI. Here's the post link,

 

http://forums.ni.com/ni/board/message?board.id=30&message.id=3823#M3823

 

Thanks again.

0 Kudos
Message 3 of 3
(2,537 Views)