LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDA module case stucture problem

The LabVIEW PDA module is driving me nuts again! (PDA module for PPC2003, and LabVIEW 7.1 etc is patched up with the 7.1.1 maintainence release download)
 
I have an application which connects to an instrument by a serial interface, and I want to store settings in a configuration file. I want to use text files that can be read (ie checked) with a text editor. For ease of identification I use the extension cfg for these files. For the PC this is easy, there are vi's to read and write config files with keys. So far so good.
 
Switching to the PDA, the same vi's don't exist. So I'm working through long hand, reading a line of the file at a time, splitting key from value, and filling in a global cluster by checking which key has been read with a case structure.
 
Mostly the technique works (but if you think it's crude enlighten me) however it falls down with the case named "Reading Format" - the application latches up and I don't know why.
 
Change the case name (so there is no match and it doesn't execute) and the loop proceeds to the end of the file. All is well.
 
To execute the code I post, stick the file 'example.cfg' on your PDA in "My Documents\Inst Cfg Files\"
 
0 Kudos
Message 1 of 3
(2,419 Views)
Hi Bandit,

Sorry for the delay, but I have found a solution to your problem, I am still unsure as to why this error occurs, but you can get around it in 2 ways.

1) You can set the Reading Format case to be the default case. However this is not the best solution as you will be putting data into your global.
2) In the case structure value list remove "Reading Format" and replace with "Reading/sFormat" using the slash codes makes sure the data is exactly the same.

Hope this helps you.

Regards
JamesC
NIUK AE
Message 2 of 3
(2,381 Views)
Hi James,
 
Thanks for the excellent reply, problem sorted using your second method.
 
It's a strange problem, pity we don't know why it happens, but we have a solution and that's what I needed.
 
Many thanks.
 
Bandit.
0 Kudos
Message 3 of 3
(2,374 Views)