LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to view the curve of the past on Strip Chart ?

Where exactly the program crashes and which error do you receive?

You should also add some error checking on file I/O operations (test 'if r == -1' after ReadLine)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 11 of 23
(1,609 Views)

Hi !

Thank you for your advice.

I use Strip Chart to view the curve of the real-time data change. I have seen the example " Creating a scrolling graph."before,but it is not a complete project and disappears a file "legend.h",so the file "legend.fp"

Later,I decided to use Strip Chart instead of graph.

Besides,I have debugged the 1.jpg    It could not see the ever curve.

 

Would you have any good idea ?

Thank you very much !

Best regards.

 

xiepei

 

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 12 of 23
(1,607 Views)

xiepei,

would you mind telling us whether you want to use graphs or strip charts?

The code you posted makes use of graphs: you say it is crashing somewhere but without details on the error received and its location is difficult to give you assistance. Nevertheless I would like to have it working, since it seems to me that can offer you some help in addressing customer requirement (moreover it is taken from a sample of mine and I am pretty sure it worked in original release Smiley Wink so it should be easy to debug).

 

Regarding the sample project I suggested you, it makes use of the legend control, which is actually not a necessary part for the example: you will be able to run it simply commenting out all references to that control (that is legend.h include, hlegend variable and SetUpLegend function).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 13 of 23
(1,603 Views)

Hi !

Thank you very much for your reply.

Frankly speaking, I want to use strip charts because of its higher real-time.So I use strip charts in "Power Supply Monitor" and "Instrument Display(gas concentration and temperature, humidity)" interface.Thus,it's more convenient to see real-time datas change.But,it could not view the past datas curve change in CVI8.0.Therefore,I use graphs in "Power Supply Monitor Data Playback"and "Instrument Display Data Playback" interface to read datas chosen first and then  plot them .

The attachmet is my project. It could save all the datas at the same time,including datas shown  on "Power Supply Monitor" and "Instrument Display(gas concentration and temperature, humidity)" interface.

 

Thank you very much !

Best Regards.

 

xiepei

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 14 of 23
(1,592 Views)

Xiepei,

 

I've attached an example that shows you how to implement data scrolling using a Strip Chart.

I didn't write the code myself and I forget where I got it from.  

This project was written in CVI 6.0 and should runs on your version without any issue. 

The "toolbox.fp" might reside in a different folder on your PC.  Just load it manually if necessary.

0 Kudos
Message 15 of 23
(1,580 Views)

Hi !

Thank you very much for your reply.

The "toolbox.fp" I have found in a folder on my PC.tool.jpg

I could add it to my procedure from this folder.

Thank you vey much !

Wish you happy every day.

Best regards.

 

xiepei

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 16 of 23
(1,564 Views)

Hi !

It's really embarrassed to bother you again.

Whether I use graphs or strip charts,I must solve the  prolem that make the whole system crash when the .txt file is more than 400 kb.Because our field workers asked me to solve this problem first.I have uploaded the whole project "Save all datas.zip 27 KB"  in this page.

The .txt file saving the datas  is more than 400kb ,so I do not upload it.This is a part of yb.txt datas that replayed in "Instrument Display Data Playback" interface .

06-13-2011  17:29:36      0,  0,  0,  0, 0,  0,  0

06-13-2011  17:30:06      0,  0,  0,  0, 0,  0,  0

06-13-2011  17:30:36      0,  0,  0,  0, 0,  0,  0

06-17-2011  09:15:25      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:15:55      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:16:25      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:16:55      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:17:25      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:17:55      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:18:25      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:18:55      0,  0,  26,  0, 68,  100,  0

06-17-2011  09:19:25      0,  0,  26,  0, 68,  0,  0

06-17-2011  09:19:56      0,  0,  26,  0, 68,  100,  0
.........

 There are more similar datas below.

It is  "Power Supply Monitor Data Playback"and "Instrument Display Data Playback" interface that make the system crash when they read datas more than 400kb.

Would you mind having a look at it ?

Thank you very much !

Best regards.

 

xiepei

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 17 of 23
(1,561 Views)

Hi xiepei,

I will try to test your code with some fake data but in the meanwhile I would like to know if you receive any error and where you receive it while handling a big data file. Knowing the error code and the line where it happens makes it easier to find problems in code.

Also, consider posting a true data file: even if bigger than 400kb, since it is a text file it will reduce to very few kb when compressed.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 18 of 23
(1,554 Views)

Hi !

Thank you very much for your reply.

I did not receive any error when I debug it.When I switch to "Instrument Display Data Playback"interface and press "Data  Playback"button,the whole system went frozen.I must press "Ctrl+Alt+Delete" buttons to terminate debugging.

The attachment is such a text file.

Best regards.

 

xiepei

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
0 Kudos
Message 19 of 23
(1,549 Views)

Hi xiepei, you cannot obtain a good graph with the file you posted!

The program infact does not raise any error, but the file contains bad data: it has recordings for june 13, next june 16, next june 13 again and 16 again and so on! With such data structure you cannot expect a regular XY graph.

It seems as it is a fake data file created for testing purposes copying a block of data several times on a single file. Can you attach a regular data file for me to test the system?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 20 of 23
(1,544 Views)