DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the x scale in view mode

Hi,

I am evaluating diadem in looking at tdms files I am generating (among other uses). The data is acquired at 20 hz.  When dragging the channel into the view pane, the x axis reflects the sample number, or actual sample index in the array.  I want to somehow scale the x axis when viewing to reflect time, not sample index.  So the formula to convert the x scale value to hrs would be (X index / 20) / 3600.  I tried to go to analysis, and artificially generate a "time" channel based on a basic mathmatics/scale, but I cannot choose the "linearScaled" value in the x axis as a basis of calculation. 

So it seems like the X axis is being autogenerated based on the sample index of the data when generating the view, but I can't find a way to change this.  Is there a way?

 

Thanks

David J.

0 Kudos
Message 1 of 4
(3,955 Views)

Hello David,

 

What you are looking to do is a pretty basic function of VIEW, so we should be able to get you on the way there quickly.

 

Do you create waveforms (channels with embedded X-channels) or simple numeric channels in your TDMS?

 

You can tell by the icon DIAdem is using in the DataPortal. Waveforms have a "squiggly line" (or sine wave) icon and numeric  channels have a "123-icon" in front of them in the DataPortal.

 

If you have a waveform, DIAdem will automatically use the X-channel information embedded in the waveform channel to create the X-axis in VIEW (unless you select an X-channel, in which case the waveform information will be ignored). If you have a numeric channel, DIAdem will plot the data against the index number unless you also provide an X-channel.

 

If you have a numeric channel, we'll need to provide the time information in an X-channel. That can be created in the ANALYSIS part of DIAdem with a simple function.(in ANALYSIS -> Channel Functions - Generate numeric channel)

 

Another  thing to know is that you need to assign the channels correctly in VIEW(you can see the channel assignment in VIEW by double clicking on thewindow that displays the graph).

 

If you can share your TDMS file, please send it to my email: otmar DOT foehner @ ni DOT com

 

Alternatively, call NI at (888) 280-7645 and ask to be connected to me (assuming you are in the Americas and we share timezones), it is often easier to communicate things on the phone than via forum posts, that way I can ask questions and guide you through the process more easily.

 

Best regards,

 

    Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 4
(3,944 Views)

Hello Otmar,

I am just getting back to this, as I have been dealing with other aspects of diadem trying to figure them out. 

 

Yes I am storing simple numeric channels, so it appears I'll need to create the channel in Analysis. 

 

I'll send that tdms to your email, with an explanation as to how I'm storing the data.

 

Thanks for your help...

 

David J.

0 Kudos
Message 3 of 4
(3,907 Views)

Hi David,

 

Otmar and I have been working together on your 2 threads, which are logically intertwined.  My recommendation would be to create waveform channels at the same time that you're creating these data channels with the TDMS Write.vi in LabVIEW.  For existing TDMS files that need to be converted, I'd suggest converting them into waveform channels instead of creating a separate time channel.  As we discussed in the other thread, there is no way for a DIAdem VBScript to access your label strings the way you're currently storing them, so that's one thing a VBScript won't be able to correct, whereas a conversion VI would be able to.

 

Here's a VBScript that uses the "Integration_Period" to set the waveform time interval,

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 4
(3,891 Views)