944,135 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Aug 18th, 2006
0

displaying labview graph on vb6 form

Expand Post »
hii all
yet another question from me..
i have written a code in vb6 to call a labview7.1 vi and run it. the labview code acquires data and plots the data continuously as long as the program is running. now i want this graph to be plotted on vb6 form.
any ideas how i can do it?
thanks.
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006
Aug 19th, 2006
0

Re: displaying labview graph on vb6 form

Eak, does labview write a .txt file, or some means in which VB can read the data?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 19th, 2006
0

Re: displaying labview graph on vb6 form

yea labview can write a text file or excel data file.
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006
Aug 19th, 2006
0

Re: displaying labview graph on vb6 form

Then, if you can past an example of that file.... I can see about how to go about reading it. What I'm guessing you'll have to do, is have labview write a file (either one, text or excel, vb can work with both) and then get a list of points out of that file, and plot them using pset or something.....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 19th, 2006
0

Re: displaying labview graph on vb6 form

ok i got ur point.
in that case i wud like, as the labview program wud continuously add/save data to a excel/text file... vb wud continously read this file and plot the graph in its form or mschart control or whatever is suitable.
now i dont think i know how to do it. i guess i can use some array and save some data points in it and keepon updating that. i m not sure though. can u give me any example of plotting realtime graph in vb?
the excel/text file have 3 columns first one time, 2nd column depth and the third is distance. now depth and distance needs to be plotted in y axis and time in x axis.
the data file can be really large.
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006
Aug 21st, 2006
0

Re: displaying labview graph on vb6 form

guys... can u plz give me some ideas about this real time plotting thing.
i have a text/excel data file where data is being continously added. i want to plot this data wrt time on a vb form.
i m stuck.. plz help me. thanks.
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006
Aug 21st, 2006
0

Re: displaying labview graph on vb6 form

Is the textfile constantly being "ADDED" to, or is it constantly being UPDATED (there is a difference, ya know... added to means that it leaves the data alone that's already in the file, and just adds more data to the end, while updated means that it's possibly changing the data already in the file)
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 21st, 2006
0

Re: displaying labview graph on vb6 form

no its just adding the data..
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006
Aug 21st, 2006
0

Re: displaying labview graph on vb6 form

So, what you'll need to do, is open the text file, and read in the data. Keep a count of how many lines there are. Then, in a loop, read any added data (any lines greater than the last read) and plot them. Do this over and over until the file is done updating, and you should be good to go. Something to keep in mind, is that file is going to get big probably, so... you may want to check it's size every so often, and if it reaches a certain size, delete the file, and reset your count. I don't know what kind of effect that's going to have on labview though..... it might get pretty pissed about you deleting the file.....

Is it necessary to actually have the VB app plot the data, or would having the VB app kidnap the graph area work?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 21st, 2006
0

Re: displaying labview graph on vb6 form

well i have checked with labview and found that labview doesnt allow vb to get its graph. that is the graph object of labview isnt accessible to vb.
i understand what u said abt the vb coding stuff... but can u give me some similar example code.. it seems to me pretty daunting (for my capabilities).
thanks.
Reputation Points: 10
Solved Threads: 0
Light Poster
Shefali is offline Offline
36 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: MS Access 2000 - Inserting records in a new table by joining input from two tables
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: in Word





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC