LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph XY - plot issue

Solved!
Go to solution

Hello,

 

I have got few issues I can’t solve . Fist one is that Graph XY plots values from sensors with some unexpected delay. What I mean is that sensor changed is value, graph is picking those changes after 2-5 sec. I don’t know is causing this delay to Graph XY.

 

Can I round the values (not to the nearest – function) from sensor as a rating and small value changes causing Graph less readable.

 

The last issue I have got is there any possibility to setback Graph XY LVDT value to zero while program is running?

 

Thanks

0 Kudos
Message 1 of 18
(3,855 Views)

Hi gregorian,

 

remove the wait function from your AI loop!

And set a fixed amount of samples to read: I recommend about 1/10 of the sample rate…

(You should also use "Continuous samples" sample mode when you want to read continuously!)

Best regards,
GerdW


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

Hi GerdW,

Thanks for reply.

I use Continuous samples mode when I run a program.

 

I am quite new in LabVIEW. Could you tell me how to setup fix amount of samples to read.

 

Do you know how to set back zero on LVDT axis while program running (property node)?

I will need it as during test LVDT not always is fully extracted. Sometimes test is started in its half way position - that why I will need to set up zero on GRPAH XY.

 

Thanks,

gregorian

0 Kudos
Message 3 of 18
(3,833 Views)

Hi gregorian,

 

I use Continuous samples mode when I run a program.

As you didn't set proper default values this wasn't visible in your VI…

 

how to setup fix amount of samples to read.

Read the help for DAQmxRead function…

 

Do you know how to set back zero on LVDT axis while program running

Yes.

You are looking for a "tare" function? Then you need to program it…

(Search for "tare" in the LabVIEW board and you will find a lot of inspiration!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 18
(3,829 Views)

Hi Gregorian7, 

 

We have online resources that might be helpful for what you are trying to do: 

 

Kind Regards, 

 

Riley Ilieva

Applications Engineer

National Instruments

0 Kudos
Message 5 of 18
(3,806 Views)

Hi Riley,

 

Thanks for the links - there are very heplfull.

 

Could you help me out with my Vi and tell me why Graph XY doesn't read value from LVDT. It reads only initial first value and keep it in an array for hole time Vi running.

 

I can read right and display value on 'STROKE chart' though. That why I don't understand why graph XY doesn't record any LVDT's signal changes, only plotting changes from force sensor.

 

Thanks,

gregorian

0 Kudos
Message 6 of 18
(3,794 Views)

Hi GerdW,

 

Thanks for you helpfull inforamtion.

 

Hi Riley,

 

Thanks for the links - there are very heplfull.

 

Could you help me out with my Vi and tell me why Graph XY doesn't read value from LVDT. It reads only initial first value and keep it in an array for hole time Vi running.

 

I can read right and display value on 'STROKE chart' though. That why I don't understand why graph XY doesn't record any LVDT's signal changes, only plotting changes from force sensor.

 

Thanks,

gregorian

0 Kudos
Message 7 of 18
(3,793 Views)

Hi Gregorian, 

 

I think you only read one value because the event is not in a loop so the event only happens once and one value is plotted. There is some information on how to set this up with a loop here

 

Also note the difference between a chart and a graph. A chart would chart data as it is acquired and display historical information (previous values),whereas a graph would plot an array of data. There is a more detailed explanation here

 

Are you reading any values from the LVDT? Have you tried the text panels in NI MAX?

 

Many Thanks, 

 

Riley Ilieva

Applications Engineer

National Instruments 

0 Kudos
Message 8 of 18
(3,790 Views)

Hi Riley,

 

Thanks for reply.

Actually I trying VI to Force.VI get to work.

 

I have confused you as I attached hole project. Sorry about my mistake.

 

I have attached only VI I was posted about.

 

Yes, I do read signal from LVDT and I can monitor it on graph in my VI. I just don't know why GRAPH XY only read changes to Force but not plotting any changes on Y axis. So, I definitely acquired signal from sensor (also checked i NImax).

 

Thanks,

Gregorian

0 Kudos
Message 9 of 18
(3,783 Views)

Hi gregorian,

 

why do you subtract that array constant from your x values (Force data)?

That constant contains just one element, but you are reading 100 samples from DAQmx…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 18
(3,778 Views)