NI Home > Community > NI Discussion Forums
Reply
Member
Spidermansrevenge
Posts: 8
0 Kudos
Accepted Solution

Aligning CursorX with a given cursorY value

Thanks in advance for any help:

 

I am using DIAdem 2011 and am looking for the Script function that will give me a value (time cursorX) when I locate a measured cursorY location. The problem I am having is I can place the cursorY on a voltage location on a curve, but the cursorX does not follow ( almost like it is in "Free Cursor" mode) . 

I am looking to measure the time delta from two different voltage locations on a signal using the cursorX and cursorY .

 

I am using the "Frame Cursor" , "Curve Cursor" function.

 

Any Ideas?

 

Thanks

SJD

Trusted Enthusiast
Brad_Turpin
Posts: 2,719
0 Kudos

Re: Aligning CursorX with a given cursorY value

Hi SJD,

 

The VIEW cursor can only follow one curve at a time in the "Curve Cursor" mode, so it always follows the "Active" curve, the one with the black filled dot in its legend.  You can change which curve is active by clicking inside the legend color square of the curve you want to set to active.

 

When using the frame cursor in the "Curve Cursor" mode, all the (X1, X2, Y1, Y2) cursors follow along the active curve.  The frame cursor forms a rectangle, and the lower left and upper right corners of that rectangle always lie on the active curve.

 

Try clicking on the "Coordinates" icon in the top VIEW icon list to pop up the floating coordinate window-- near the bottom it will display a "dX-Cursor" which is exactly the elapsed time between the X1 and X2 cursors.  That should be what you're looking for, based on your problem description.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Member
Spidermansrevenge
Posts: 8
0 Kudos

Re: Aligning CursorX with a given cursorY value

Thanks Brad for you quick response.

It’s kind of yes and no as to what I was looking for. What I am trying to do is read the (Time) value of  CursorX1, CursorX2  after setting the voltage level of the  CursorY1 and CursorY2 in my Script file.

What I need to do is fined the Slope of the line at specific voltages locations on the curve. (volts per second)

 

This is part of the Script I am stuck on:

I am kind of new at this so I don't know all the tricks and commands yet....

 

 

 

Thanks again

SJD

Member
Spidermansrevenge
Posts: 8
0 Kudos

Re: Aligning CursorX with a given cursorY value

I tried to check the Attachment and it saved it in another format I couldn't open.

( it was saved in MS word 2010)

See if this works.

 

SJD

Trusted Enthusiast
Brad_Turpin
Posts: 2,719

Re: Aligning CursorX with a given cursorY value

Hi SJD,

 

I think it's a mistake to send only one value to a channel.  If you want to view that set of 4 scalars, I'd recommend sending it to the VIEW legend or a VIEW text area or a floating dialog.  I'm attaching the VIEW text area option below.  The "View Slope Info Start.VBS" could be added onto your existing script-- it sets up the "View Slope Info Event.VBS" script to run every time the cursor changes.  Then the "View Slope Info.TDV" layout shows the info at the top VIEW text area.  I had to press <F5> to force the text area to refresh, but I didn't think that was usually necessary.  You'll need to change the TDV file I sent to show your "'Command Input'" channel or whatever XY plot you want to measure the slope from.

 

Ask if you have additional questions,

Brad Turpin

DIAdem Product Support Engineer

National Instruments