Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Camera Tester

Posted on 2002-06-20
5
210 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

839 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