please help in VB6.0

Discussion in 'Programmer's Corner' started by eng.zaid, Dec 10, 2007.

  1. eng.zaid

    Thread Starter Member

    Dec 6, 2007
    I need to know how to plot graphs in VB for a data collected from a parallel port as function of time for device measuring a variable quantity like temperature or flow or voltage etc.....) versus time.

    Please i am depending on you.

  2. CVMichael

    AAC Fanatic!

    Aug 3, 2007
    Did you figure out how to read the data from the port ?

    I myself never tried to read data from parallel port, but I did manage to output data. You cannot do it VB6 alone (depending on what windows you have), you need a DLL to be able to read/write to the port.

    Also, at what frequency does the data come in ?

    I am asking that because if it's comming too fast, then I don't see how you are able to read with VB6 because I don't think VB6 can get an event when data is ready to read. You will have to have an infinite loop to monitor the port for any changes.

    Right now you should focus to figure out how to read the data, plotting to a graph is the easy part.
  3. eng.zaid

    Thread Starter Member

    Dec 6, 2007

    First i want to thank yo for reply,second the frequency is small under it is 5 Hz and i know how to get data from parallel port on widows xp using vb 6.0, but as variable vlue ,but i need to plot this variable value with time as a function to show the waveforme of this signal (i.e I want to see the signal as i see it on oscilloscope).
  4. CVMichael

    AAC Fanatic!

    Aug 3, 2007
    Hi eng.zaid,

    Well, first thing you need when plotting is to know the lowest value and highest value that you will ever receive.

    After that it is just a matter of drawing a line from last position to current position on the graph.

    I know you told me that the frequency is 5Hz, but is that constant ? or does it change in time ?

    Do you think you can post the VB6 project here so then it will be easier for me to add the code for the graph ?

    Also, please don't make a new thread, post a reply in the same thread, this one....

    Admin should merge the other thread with this thread...
  5. Dave

    Retired Moderator

    Nov 17, 2003
    As requested.

    eng.zaid, please do not create multiple threads for the same query, it makes it difficult to keep track of and lees likely for people to respond to your query. Thanks.

  6. kender

    Senior Member

    Jan 17, 2007