08-18-2015 05:40 AM
Hello,
With the new version of Diadem. I am tring to import a text file and assign a registerval1 variable to a value.
Previously it appears to be using a STP file.
The txt file looks like this:
Firing Pressure
17/08/2015 16:18:47
122.223
Final Reservoir Pressure
17/08/2015 16:18:50
92.014
Sled Velocity
17/08/2015 16:18:47
14.945
0.000
Kg
And would like to read the file into Diadem, then record the Sled Velocity value as a variable.. 14.945
I would also like to record the date and time as a variable.
Thanks
Stagsden
Solved! Go to Solution.
08-18-2015 08:26 AM
Hi Stagsden,
There's no way to directly convert an STP file to a DataPlugin with modern versions of DIAdem. That might actually work with DIAdem 10.0 if you launch the ASCII Import Wizard. Still, the goal appears to create a new DataPlugin, and what you've submitted so far would be easy for me to create from scratch. Could you send over a complete file? The invisible endline characters need to match exactly, which I can't get from the text snippet you posted.
Also, nowadays we don't use the registerval1 type variables any more, because you can create your own custom variables with descriptive names, such as
Firing_Pressure
Firing_Pressure_Time
Final_Reservoir_Pressure
Final_Reservoir_Pressure_Time
Sled_Velocity
Sled_Velocity_Time
Do you have other code that absolutely must read those old variables, or could we switch over to nice descriptive names for those properties?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-18-2015 08:36 AM
Hello Brad,
I have no problems with using the descriptive names for the variables. That makes life a lot easier.
I have attached the file and previous STP file if that helps.
Regards
Jim
08-18-2015 05:30 PM
Hi StagsDen,
Here's a DataPlugin that parses those regular strings into custom properties attached to both the File and Group levels.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-19-2015 06:38 AM
Thanks Brad,
works fine