Solved

Camera Tester

Posted on 2002-06-20
5
207 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

744 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

15 Experts available now in Live!

Get 1:1 Help Now