LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Width of Hysteresis

I need to compute the width of a hysteresis plot. I have been wondering if there is built in function or a combination of them that can do this computation directly from the XYGraph. 

 

Any ideas?

 

Thanks,

Gregorian7

0 Kudos
Message 1 of 13
(2,877 Views)

Hi Gregorian7

Would you please send your code?
The width of hysteresis plot could be computed easily. 

But before anything else clarify the parameter you want to compute on the plot. I mean the region you in the plot you name it "the width of hysteresis plot".

 

Regards,
Hossein

0 Kudos
Message 2 of 13
(2,845 Views)

Hi Gregorian,

 

I need to compute the width of a hysteresis plot.

So you want to calculate the x distance for the same Y data for the up and down side of your hysteresis curve/plot?

 

I have been wondering if there is built in function or a combination of them that can do this

Surely there are functions to determine values of plot data (read carefully: "plot data", but not "the plot itself") like Threshold1DArray. You just need to prepare your data and combine the results…

 

computation directly from the XYGraph. 

No, THINK DATAFLOW!

The XYGraph is just an indicator for some data - you need to do the calculation with those data!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 13
(2,835 Views)

Hi GerdW,

 

So you want to calculate the x distance for the same Y data for the up and down side of your hysteresis curve/plot?

Yes, that exactly what I want to achieve.

 

Surely there are functions to determine values of plot data (read carefully: "plot data", but not "the plot itself") like Threshold1DArray. You just need to prepare your data and combine the results…

How can I be sure  if there is exactly the same Y data value for the up and down side of the plot to do the calculation?

 

Regards,

Gregorian7

 

0 Kudos
Message 4 of 13
(2,825 Views)

Hi Hossein,

 

I attached the picture with marked distance I'd like to calculate. 

 

Regards,

Gregorain7

0 Kudos
Message 5 of 13
(2,823 Views)

Hi gregorian,

 

How can I be sure  if there is exactly the same Y data value for the up and down side of the plot to do the calculation?

You can interpolate your measurement data for the same Y value…

(With usual measurement data you will never get the very same X and Y value due to random noise.)

 

Edit: You don't need to post the same image twice. You can even edit your own message to add text…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 13
(2,822 Views)

Hi GerdW,

 

Could you help me out a bit.

If I've got an  2D array one column represent Force and one Stroke.

What do I have to do? Index array to get a subarray with stroke values and find indexes with the same data value then search for them in force array and subtract them? 

 

How can I interpolate data for the same Y value?

 

Regards,

Gregorian7

0 Kudos
Message 7 of 13
(2,811 Views)

Hi Gregorian,

 

Could you help me out a bit.

Sure - as soon as you provide an example VI with some example data representing your typical plot data!

 

What do I have to do?

1. Separate your data into the up and the down cycle.

2. Use any of those interpolation data to find the X coordinate for the interesting Y value.

3. Do step 2 for both cycles.

4. Get the difference of both X values…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 13
(2,805 Views)

Hi Gregorian,

 

I saw the picture. It could be easily done just by a small piece of code. 

Please determine two things, then I will modify your code,

1-The minimum and the maximum allowable of width. For example we say if the width is going to be bigger than x1 it's proper to compute and show the value and if it is going to be smaller than x2 then it's not proper. It's a reasonable to have an interval for allowable values, without this you don't define anything to compute. Imagine I am just a programmer and I don't have the knowledge of your test and I don't know what is hysteresis but I can implement your goal by programming, this is the reason of asking this interval.

2-If you can take a picture from the part of your LV code in block diagram which is connected to the XY-chart block. If you can send the whole program it's better and easier to modify it but the the picture I mentioned is enough for me.

 

Regards,

Hossein

Message 9 of 13
(2,791 Views)

Hi Hossein,

 

Thanks for your reply.

 

1-The minimum and the maximum allowable of width. For example we say if the width is going to be bigger than x1 it's proper to compute and show the value and if it is going to be smaller than x2 then it's not proper. It's a reasonable to have an interval for allowable values, without this you don't define anything to compute. Imagine I am just a programmer and I don't have the knowledge of your test and I don't know what is hysteresis but I can implement your goal by programming, this is the reason of asking this interval.

There is no min allowable value as in  my case, hysteresis width = 0 will be a perfect situation. Max. is  9.

 

I have attached project to this message.

 

Thanks,

Gregorian7

 

0 Kudos
Message 10 of 13
(2,772 Views)