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.
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.
05-22-2008 10:08 AM
Hi Stagsden,
I would be happy to look at your ASCII file, but unfortunately I can't seem to detach it-- I keep getting an empty IE screen whenever I try. Would you just paste the first 20 or so lines of the ASCII file into the body of your reply? Then I can make a *.txt file out of that and use it instead.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
05-23-2008 09:45 AM
Hi StagsDen,
A colleague was able to download your txt file for me. I created a DataPlugin that works perfectly on my computer for this one file. Your file starts with 3 null strings and a final character («) with ASCII code 171. I went ahead and required this to always be the case in the DataPlugin and to fast forward to the 5th character in the file to use as the beginning of the first channel name. Note that I pushed the unit strings in each channel name into the unit property of each channel in the Data Portal. I think you will find that this makes it easier to use that information in DIAdem, particularly once you upgrade to DIAdem 11 with its new built-in unit handling.
See what you think,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
05-23-2008 10:10 AM
05-27-2008 04:10 AM
11-15-2011 12:19 PM
Hey Brad.
I have a similar problem.
How would I manually add channel units to the channels when importing a text file?
11-16-2011 10:48 AM
smoothdurban,
What Brad was helping the previous customer with was importing a text file and managing the names and units. If you look back at the attached text file from the third post in this thread, there are columns of data with headers. Make sure you format your text file in this way before trying Brad's solution at the end of this thread.
If you'd like, you can attach your text file and I will help you examine the difference between yours and the one discussed earlier in this thread.
11-16-2011 10:56 AM
Hi
I Have attached a copy of a piece of data. The first column is time and the second is a voltage which will be converted to a load later on.
I am simply trying to add units to this data when it is imported into DIAdem.
11-17-2011 06:52 AM
Hi smoothdurban,
By manually, do you mean that it's something that can be hardcoded or IF THEN case statemented in the DataPlugin, or are you asking how to change a channel unit in the Data Portal with mouse and keyboard? Do you also need to scale your data values to engineering units, say from Volts to Newtons?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-17-2011 01:12 PM
Hey Brad
Yes I would like to hardcode this in the IF THEN statements in the DataPlugin. I know how to change the channel units once the are included into the channel. I also know how to scale the units using the calculator.
11-17-2011 09:30 PM
Hi smoothdurban,
I wrote a DataPlugin that loads the one *.txt data file you posted. You just need to detach the ZIP file, unzip it somewhere, then double-click on the *.uri file to register the DataPlugin, after which you will be able to drag this file and any others like it into the Data Portal. The part of the DataPlugin that adds the unit is the following:
Select Case LCase(Trim(Cols(1))) Case "voltage" : Unit = "V" Case ELSE : Unit = "" End Select Channels(j).Properties.Add "Unit_String", Unit
The DataPlugin assumes the first channel is the Time channel and contains the number of elapsed seconds since 1904 (LabVIEW standard). The unit "s" is hardcoded for the first channel.
Brad Turpin
DIAdem Product Support Engineer
National Instruments