displaying labview graph on vb6 form

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

displaying labview graph on vb6 form

 
0
  #1
Aug 18th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: displaying labview graph on vb6 form

 
0
  #2
Aug 19th, 2006
Eak, does labview write a .txt file, or some means in which VB can read the data?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

Re: displaying labview graph on vb6 form

 
0
  #3
Aug 19th, 2006
yea labview can write a text file or excel data file.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: displaying labview graph on vb6 form

 
0
  #4
Aug 19th, 2006
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.....
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

Re: displaying labview graph on vb6 form

 
0
  #5
Aug 19th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

Re: displaying labview graph on vb6 form

 
0
  #6
Aug 21st, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: displaying labview graph on vb6 form

 
0
  #7
Aug 21st, 2006
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)
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

Re: displaying labview graph on vb6 form

 
0
  #8
Aug 21st, 2006
no its just adding the data..
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: displaying labview graph on vb6 form

 
0
  #9
Aug 21st, 2006
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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 36
Reputation: Shefali is an unknown quantity at this point 
Solved Threads: 0
Shefali Shefali is offline Offline
Light Poster

Re: displaying labview graph on vb6 form

 
0
  #10
Aug 21st, 2006
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 7978 | Replies: 25
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC