LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two active cursors per plot

Solved!
Go to solution

Hey all,

 

Another issue with my VI is that we need to have two cursors which find 2 local maxima in our motor current traces.... Right now, there are two plots per graph: the raw signal and the filtered signal... The statistics data (Max, time of max, etc.) is being pulled from the filtered signal as was done with the previous version of the VI. In each graph, I have set up 2 cursors of different colors and made sure they were associated with the filtered signal plot.... I then use property nodes which are slightly modified compared to the previous VI to control when they are active and where they locate to...

 

In the previous VI, there were 3 cursors, but there were 3 plots (raw signal, 1st filtered, second filtered) and therefore 1 cursor per plot was looking for one of the peaks in the motor current traces... However, that was an early stage that is no longer needed. What I need is to have two peaks on the filtered signal located with cursors.........Right now, one of the cursor's Y lines does find its correct peak (the input data from the peak is the X, Y signal outputs from the Statistics express VI).... However, the other cursor is just sitting there idle, twiddling its thumbs......... I don't understand why it isn't finding its respective peak because its input data into the property node is correct and its setting (0, 1, or 2) for the ActCrsr property is the same as that for the cursor that works........

 

 

Does anyone have any ideas as to why I am having trouble having more than one cursor track peaks on the same plot????

 

 

Thanks a bunch......

0 Kudos
Message 1 of 5
(3,610 Views)
If you can post your VI with data in it we could probably help you a lot more. Right now we have no way to know why your vi is not working properly.
Tim
GHSP
Message 2 of 5
(3,595 Views)

Hi aeastet,

 

Due to potential confidentiality issues and company policy issues, I am not sure whether I can post the whole VI. However I can post 2 picture files - one of the old VI's code and one for the new VIs code. As you can see, the new VI code is just slightly modified compared to the old VI.... The old VI worked perfectly well for its intended purposes, but lacked power and was too bloated.... Two of the main goals in revising the VI were to add more powerful analysis and features to it, but also make it more streamlined.....

 

  • As you can see, in the code for the old VI, there is a case structure corresponding to each sample load - sample load 1 is shown. There are 3 signals - raw, 100Hz LP, 500Hz LP and there are 2 split signals - each with 3 outputs each to represent the X and Y components respectively...
  • Now looking at the code for the new VI, it is simplified in that the 500Hz signal is no longer plotted nor cared about.... Furthermore, the raw signal is no longer used as a cursor location input into that property node... We only were pulling our indicated data (time of max torque, max load torque) from the 100Hz LP filtered signal and therefore the two split signals you see there are the 100Hz LP signal. The top one is capturing (extracted signal and then statistics to find the peak) the first peak when the motor loads the sample in; the bottom signal split is for the return torque when the motor returns to home.  Obviously I made sure that the CursorPosX and CursorPosY inputs into the node actually are connected correctly to their respective outputs from the statistics express vi.... Since the code for the new VI is so similar to the old VI, I am not sure as to why it is not working correctly as intended....

 

I have a feeling that the issue might be with the integer inputs (0, 1, 2) into the ActiveCursor property...... I am still not sure how exactly those work....... I have tried some different combinations of values to try to get both cursors to work, but sometimes get an error that comes up with the description of something is wrong with the ActCrsr Argument in the node........ The "Disabled" property at the bottom of the nodes refers to the whole waveform graph itself.....

 

Hopefully these pics help....

Download All
0 Kudos
Message 3 of 5
(3,591 Views)
Solution
Accepted by topic author Fascinated by Electronics

Well the first thing I see is that you have all of the cursors set to active cursor 1 you need to adjust them to 0, 1 and 2

Graph_indicators_new VI.png

Tim
GHSP
Message 4 of 5
(3,577 Views)

Thanks for the help! I am still learning a lot and am not sure why I didn't notice that pattern before.... I think i was getting the active cursor settings confused with the "disabled" property setting where you set 0, 1, or 2 depending on the state you want for the object..

 

I got confused and didn't realize it was as simple as specifiying which cursor (that you create under the waveform graph's config dialogs) is which!

 

Thanks so much!

0 Kudos
Message 5 of 5
(3,571 Views)