From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with DataFileLoadSel

Hi , I want to load from a dat file certains channels. not all of them
so i wrote the following command

Call DataFileLoadSel("D:\usr\project\Aut\3-18-2005(1_56_03(PM)).dat","DAT","[1]/Zeit")

and instead of loading only the channel Zeit , it loads all the channels but works fine if i use the following command

Call DataFileLoadSel("D:\usr\project\Aut\3-18-2005(1_56_03(PM)).dat","DAT","[1]/[1]")

the problem is that sometimes i dont know in advance the channel number so i am forced to use the channel name
also will help if for example the channel name is not in the file , i think, all channels will be loaded , if so , how can i avoid this and if a channel is not in the file , disregard it and continue with the script

thanxs in advance
0 Kudos
Message 1 of 13
(4,777 Views)
Hi Arkangel,

I've tested your problem with DIAdem 9.1 SP2 and it works fine. If you don't have the latest DIAdem 9.1 service pack please, download it from the NI web and test it again.
You can find it at: "www.ni.com/support/diasupp".

Greetings

Walter
0 Kudos
Message 2 of 13
(4,764 Views)
HI Walter
thanks for your anwser but now i tried to run the same script , with diadem 9.1 sp2 but now i have another problem, basicaly it is the same commad as before

call DataFileLoadSel("d:\usr\project\DiademScript\Drive.dat", "Dat", "[1]/[1]")

and any time i run the script i get the following message :
Error in (Row: 14, Column: 1):
Cannot load the "d:\usr\project\DiademScript\Drive.dat" file with the loading mode "DD8x"!

I even have tried with examples form this forum , in case i could have made any syntax error, still the same
0 Kudos
Message 3 of 13
(4,751 Views)
Hi Arkangel,

I've tested your command line (my modification was just the DIAdem path) and it worked fine. So I think the problem is something with the file drive.dat (can you load it?) or with the path. Does the following command work?

call DataFileLoad("d:\usr\project\DiademScript\Drive.dat", "Dat")

Greetings

Walter
0 Kudos
Message 4 of 13
(4,742 Views)
Hi Arkangel,

You can do an additional test to locate the problem. Please double-click on a *.DAT file in the DIAdem-NAVIGATOR. This is the interactive way to load a file partial.

Greetings

Walter
0 Kudos
Message 5 of 13
(4,733 Views)
HI Walter
thanks so much , you are right, must be the driver , i cannot open with double click i get the following error "Cant open file ..." but i can perform a selective load with tdm and other type of files , i will reinstall , if it not the solution , do you know the right one?

Arkangel
0 Kudos
Message 6 of 13
(4,726 Views)
Hi Arkangel,

Maybe the DAT-DataPlugin is not registered correct. You can check this as follows:
DIAdem-NAVIGATOR -> Icon: "Change data storage". In the dialog you should find a tree icon named "DAT".
If this doesn't appear you can try to register this DataPlugin by hand. Therefore go to "C:\Program Files\National Instruments\Shared\USI\Bin\" and double-click the file "uspDat.uri". You must have administrator access and restart DIAdem.

If the tree icon "DAT" already exists please send me your data file.

Greetings

Walter
0 Kudos
Message 7 of 13
(4,721 Views)
Hi Walter

As you said the plugin was not registered , i did it , and i have no problem with the examples , but I still have the same error "cant load file... with the loading mode DD8x" but there is a little difference , if you run this

Call DataFileLoadSel("D:\usr\project\strassenart\10-28-2004(3_40_49(PM)).dat","DAT","[1]/Lenkwinkel")
Call DataFileLoadSel("D:\usr\project\strassenart\10-28-2004(3_40_49(PM)).dat","DAT","[1]/Geschwindigkeit")
Call DataFileLoadSel("D:\usr\project\strassenart\10-28-2004(3_40_49(PM)).dat","DAT","[1]/Zeit")

this works fine for the 2 first lines ,and fails for the last one , but if you replace the last line for
Call DataFileLoadSel("D:\usr\project\strassenart\10-28-2004(3_40_49(PM)).dat","DAT","[1]/[1]")
works well , the only difference among these channel is that Zeit is a time channel, does it have something to do ?


I attach the same file i have been using , very small

Thanks for your help , thanks a lot

Regards
0 Kudos
Message 8 of 13
(4,715 Views)
Hi again
I just saw the dat file ,the header and the zeit channel is market as Implicit while the others are Explicit , maybe can help
0 Kudos
Message 9 of 13
(4,711 Views)
Hi Arkangel,

In general it is possible to use the channel name to address the channels in the command DataFileLoadSel (instead of the channel index) but the name has to be written exact. In your case I found that the DAT files are not written by DIAdem they were created by an other software and that's the problem. The header contains in front of the channel "Zeit" is a space. If you delete this space the command

Call DataFileLoadSel("D:\usr\project\strassenart\10-28-2004(3_40_49(PM)).dat","DAT","[1]/Zeit")

works fine.

Greetings

Walter
Message 10 of 13
(4,698 Views)