DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Time align 2D Axis Chart

Hi,

 

I am new to DIAdem, so apologies if what I am looking for already exists.

 

I have data, such as torque & angle for a rotating system.  I can plot this all against time in a 2D Axis graph, and I can also plot Torque vs Angle in a different 2D Axis graph.

 

Is there a way for me to select a portion of time from the first (time-based) graph and have the second (angle based) graph show data from the same portion of time?

 

The "Time Align" approach I have seen here simply aligns the X-axes (so if I select 2-5 seconds in one graph I will see 2-5 degrees in the other).  This is not what I want. 

 

Any suggestions?

 

Regards,

Ian

0 Kudos
Message 1 of 8
(5,136 Views)

Hi Ian,

 

Yes, you can set up custom cursors in your VIEW layout to connect the angle on the X axis of the second graph to the time on the X axis of the first graph.  If you post a sample data set with representative group and channel names, I can send you a VIEW layout file that does this.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 8
(5,121 Views)

Here is a data set.  I would be interested in plotting Input Torque vs time on one graph, and Input Torque vs Input Angle on the other.  The Torque vs Angle graph should show the same time as that highlighted in the Torque vs Time graph.

 

Thanks,

Ian

0 Kudos
Message 3 of 8
(5,115 Views)

Hi Ian,

 

The key is behind the "Cursor Synchronization..." button in the graph configuration dialog.  You set up a custom "Angle" cursor there.  Then, you need a graph that translates time to angle using both the default "X-cursor" which is set to time, plus the new "Angle" cursor for the angle.  Then you set the "Angle" cusor as the X axis cursor in the Torque vs. Angle graph and set the cursor travelling mode to latch to the curve, and <finally> now when you move the cursor on the top Torque vs. Time graph, the "Angle" cursor tracks along obediently in the bottom Torque vs. Angle graph.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 8
(5,098 Views)

Brad,

 

Thanks, it took me a while to work out what the "Graph Configuration dialog" was - that is the settings available when you double-click anywhere on the graph. 

 

Shared cursors may be useful, but what I actually wanted is to manage the data that is displayed.  In the torque vs angle chart only show a section of the total waveform, as indicated by cursors on the time chart.

 

For example, if I have a 50s recording, I could set a band cursor to 5s width in a time chart, maybe from 10s to 15s.  I want the torque / angle chart to display only the data between 10s & 15s.  This chart should update based on the band cursor in the time chart, to give an updating view of a short section of the total recording. 

 

Is this possible?

 

Regards,

Ian

Message 5 of 8
(5,052 Views)

Hi Ian,

 

Yes, this too is possible, but it requires an approach that relies on cursor events calling a VBScript, which requires considerably more work.  Please detach the attached ZIP file to a folder somewhere, then load the TDMS file you sent me into an empty Data Portal, then run the "Select Cycles.VBS" script from that detached folder.  You have to keep the 3 files from the ZIP file in the same folder as each other.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 6 of 8
(5,044 Views)

Brad,

 

Thanks again.  I tried this, but it doesn't seem to work as expected.  There was one posisble typo - in the function CyclesViewLayoutOK() one line refers to just "ViewLayoutOK".  I fixed that but it still isn't right. 

 

I don't have time now to explore the script, but I will do when I can, and try to develop from it.  (VBS is new to me too.)

 

One more question: How is this script intended to run?

 - full time in the background, constantly monitoring the band cursor position

 - automatically self-launching when the curosr is moved

 - manually called by the user after moving the cursor

 

Regards,

Ian

0 Kudos
Message 7 of 8
(5,008 Views)

Hi Ian,

 

You have to run the "Select Cycles.VBS" in DIAdem SCRIPT before anything will happen.  Currently this script will not automatically run.  The script assumes that you have already loaded the data set you wish to view into an empty Data Portal.  Once you've run the "Select Cycles.VBS", it registers the "Select Cycle Event.VBS" to be called automatically any time the VIEW cursor is moved.  If you're still having difficulties, try manually loading the "Engine Cycles.TDV" into the VIEW panel prior to calling.  It's supposed to get automatically loaded if the current VIEW layout isn't OK, but perhaps something is different on your end that I didn't anticipate.

 

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 8
(5,002 Views)