Solved

Camera Tester

Posted on 2002-06-20
5
208 Views
Last Modified: 2010-05-02
ok I'm going quite well with the course. But to save me a bit of time, can you tell me how I can get 5 text boxes/labels to display a different time value, to time has to be accutate up to 10,000th of a second. Basicly as i  mentioned in my earlier comment i'm doing a program to time a cameras shutter speeds and run time.
I need 2 boxes to display the run time of the shutter and 3 boxes to display the shutter speeds. i can explain in more detail how it will all work if needed.

Can i have 5 of VB's timers to do it or is there any easier way to time this at these speeds and very very accuratly??

Andy :-)
0
Comment
Question by:MrNov
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:PNJ
ID: 7098980
The standard VB timers are only accurate to the speed of the real time clock in your PC. This value is about 18 msec (ie one tick per 0.02 (ish) seconds) depending on the operating system - so you're way off the 0.0001 second mark.

There's also a Multi-Media Timer (see  http://www.vbaccelerator.com/codelib/ssubtmr/hirestmr.htm) but this only says it'll do up to 1 msec (0.001) - still 10 times too slow.

Can I have a bit more information as to what you're trying to achieve?
0
 

Author Comment

by:MrNov
ID: 7099174
The prject is to write a program that will A) measure how long it takes shutter to open and close and B) the spped of the shutter ie.
 the probe I'm making will have five light sensors (will only worry about 3 of them at the mo as only 3 are used at any one time) set out in a line

               3    2    1
               *    *    *
RUN TIME,
when cell 1 recieves light it will starts timer - A, and when it stops recieving light it starts timer B.

When cell 3 recieves light it stops timer A and when it stops recieving light it stop timer B.

SHUTTER SPEED
When cell 1 recieves light it starts timer 3, when it stops recieving light it stops timer 3.....
and the same on cells 2 and 3.

If possible i would like all this to be done on one screen and one program, but it can be done on two screens and done seperatly.

Hope this is enough info for the help i need.

Andy
 
0
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
ID: 7103198
I don't believe the PC timers will have anything like the accuracy you require. I did some research and the MINIMUM resolution is 1 milli-second. Even if you were to use these, then VB would not be able to respond accurately enough to the start/stop events.

If I interpret correctly, then you must have some sort of hardware box with the 5 sensors that's interfaced with the PC. I think your hardware solution must contain hardware timers that are started and stopped as you require. You don't mention how you're going to interface the probe to the PC, but how ever you do it it looks like the solution will be to send an interrupt to the PC that signifies "end of test" and then your program will have to read the timer latches from the probe.

One you've got these values in "slow time" then it's very simple to write them onto the screen.

I can help with the VB side. How are you going to interface your >probe I'm making< to the PC?

Pete
0
 

Author Comment

by:MrNov
ID: 7104442
I was told on here that I could possibly use the "hand shake" routine to reconise the start/stop of the switches, so i was just going the make the probe with 5 light sensative diodes that will send a posative signal to the pc through the serial port. but i also have to use an A/D converter to work out the exposure side of the program, but at the moment i want to concentraite on the run time and shutter speeds.......1 step at a time...lol


Andy
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7923668
Hi MrNov,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept PNJ's comment(s) as an answer.

MrNov, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now