Q: I was told that inputs to this version of the A032 timer were TTL

Institute of Electronics and Computer Science
INTRODUCTION
TIMING PRODUCTS
ORDERING IFORMATION
NEWS
WHITE PAPERS
PUBLICATIONS
TO MAIN PAGE
Frequently Asked Questions (FAQ) related to A032-ET employment
1. Can you clarify what NIM pulse (high level) means for GATE IN?
2. How to test A032-ET on cable delay with simple TTL pulse generator?
3. Can you rectify requirements to PC for Server installation?
4. What the error message -10 in “Timer calibration” mean?
5. Why the “Timer calibration” take so much time?
6. How often I have to execute the “Timer calibration”?
7. Where and how should I put the icon file for Client program debugging?
8. Could you tell me about TimeAr array in Client program?
9. Could you show me the use of some parameters in Client program?
10. How long does it spent from starting to get data in device FIFO buffer to finishing it?
11. How many seconds does A032 runs before it is cleared and how it matches UTC time?
12. Can I get the time-tags one by one, not cumulated to 25/50/102/204? Can I get the timetags from the A032-ET via EPP not via TCP/IP?
13. Is it possible to talk directly to A032-ET via EPP - and not use client/server? Is there
programming manual for direct EPP interfacing?
14. I would like to use Linux on the computer for Server. What do you think?
15. How do you synchronize the A032-ET without sending it time from the GPS?
16. If I want to use two ETs in one PC, how to complish the job? Can I use ET in PC with DOS?
17. Is the file CorMicro.bin ET-device-dependent? I.e. do we get such a file for each A032-ET?
18. I want to know if the event epoch got from A032-ET is synchronous to GPS?
19. What is the shortest interval between the time of input pulse and the time data is available
to be read? ns or us?
20. I have started to program our system to use the mode 1 and I do not understand what the
flag preEF does?
21. Can I prevent the event timer (set to mode 1) to accept events for a certain time in mode 2?
22. It seems that the counter sometimes looses synchronization in my program. What I can do?
Q1: I was told that inputs to this version of the A032 timer were TTL – but the manual says NIM. Is
it correct that the Time A and B Inputs and the GATE IN are NIM? Can you please clarify for me
what NIM pulse (high level) means for GATE IN?
A: INPUT A, INPUT B and GATE IN all are the NIM-standard Fast NEGATIVE Logic Signals. High
level for GATE IN means 0 V. In case of leaving disconnected it will be in High level (or about 0 V).
In this case the Input B is opened for input events. (see Manual: p.4, p.13.)
Back to Top
Q2: I was planning to do some simple cable tests. That is use a cable delay between Input A and
Input B. But I do not have a NIM pulse generator. Do you have a circuit diagram that I can build a
simple version, I think it should be fairly easy providing a fast driver and pulse width short (>5nS)
correct?
A: To check the A032-ET at option 1 you can use the TEST OUT output (NIM) as input to INPUT A
or to INPUT B. But the power of it is not enough to split it into two signals. The period of generated
frequency is set via Server settings (see Manual: section 3.1.4 of ANNEX B, field "Period").
To convert the TTL signal to NIM pulses with a cable delay you can use the next schematic:
+5V
50 nsec
2-3sec
Period 1 msec
300pF 1N4148
From
TTL generator
to INPUT A
-1.2V
Cable delay
51
510
to INPUT B
-0.8V
Delay 150-200 nsec
Back to Top
Q3: I am using A032-ET timer. But I have a small question.
For the server PC I would like to use a small dedicated computer. There are many such "single
board computers" around and I would like to know if you have tried to run your application on one.
The manual suggests I need to run a 1GHz Pentium. But I do not want to spend that money. Any
ideas?
A: Your attempt will be successful! The 1 GHz Pentium suggestion is made for Client and Server
running at one PC. The main PC power needs for a visualization. The Server program has not
visualization or memorizing, only some calculation and interfacing with Parallel Port and TCP/IP.
We have Servers working in PCM-9371 under Windows’98 and didn't find any problems.
Back to Top
Q4: I got an event timer a few days ago. Today we do some test according to Manual (DEMO
subsystem A032.1-C1). All cables are connected. We run the Server and Client software in the
same PC, and Set parallel port at EPP Mode at BIOS. APPClient connects with the A032Server
successfully. But when we run Timer Calibration a message:
Server cannot do scaling!!
Error in scaling=-10
was pushed out at moment. With the help of manual we know the reason is the ET-device isn't
connected to the according Parallel Port. We do the test at two different computers (one desktop,
another portable computer, at same setting, EPP etc.), the same error is appeared. Could you
please tell me how to do for the wrong message in detail as soon as possible.
A: This error message generally (for beginner A032-ET users) means that:
1. Device is not connected to the PC with delivered EPP cable; or
2. The EPP port, which is pointed in configuration file "param.cnf", is not the same, which is in
Parallel Port settings.
I mean that you have a case 2. The EPP port must be written in configuration file "param.cnf" in
decimal, for example if you have Parallel Port address:
0x0378 then in "param.cnf" you must type: EPP PORT = 888; or if
0x0278 then in "param.cnf" you must type: EPP PORT = 632; etc.
Please, do the file "param.cnf" edition carefully (see Manual, p.15).
Back to Top
Q5: We had to solve a very minor problem:
Tests with Sample Program: - The "scaling" procedure should last < 10 secs, according to Manual;
- we got time-out errors, - It needs about 20 secs; - after changing the time-out value in the
software from 10 to 30 secs in the "Sample" program, everything seems to be okay. We use a slow
Pentium 4 / 600 MHz / Windows XP for these initial tests; did we miss some point in the manual ?
A: It is surprisingly for me, too. On all our PCs (including PC 166MHz and PC-104, Win'98) the
scaling longs from 5 up to 10 secs. But I presume that this time depends on Parallel Port, PC
performance and Compiler modes.
In standard distribution the "time-out" parameter is fixed in SERVER program and it is 20 secs. It
was done because in Server program the calibration data are additionally checked and in case of
bad time-base the time-out may be exceeded.
As I heard: the 600 MHz is not a good performance for Window XP. We in these cases use
Windows '98.
Back to Top
Q6: I’m not jet familiar what’s going on during the “Timer Calibration” and how often we have to do
it, but I would like to investigate some time to solve the problem of needing so much time: around
35 seconds in Pentium Pro 200MHz, 64MB RAM NT4 Service Pack 6.
I hope you can help us.
A: In calibration procedure program starts the device to log the events from the internal generator.
Such logging occurs the fixed time about 120 ms. After that the program reads logged data from
the device over Parallel Port. In our case it takes from 400 up to 900 ms (In your case I don’t
know). If the number of logging cycles is less than 10 (parameter RPT_SCALE) the program again
starts the device to log, but in this time do some data processing and accumulation. In our case
this doesn’t take the time at all (In your case I don’t know). Only these 10 cycles are controlled by
the parameter TIME_MAX. In case of Sample program it is all, but in case of A032Server there can
be additional cycles, because the program estimates the quality of the statistic and if it is not
enough good, it repeats the logging. The criteria of goodness are based only on the experience
and depend on the time-base. On the base of this logged information the program does the
statistical processing and calculate calibration table.
The good calibration after essential A032 device warming up (3-5 hours) can be used very long
time (weeks) without significant accuracy change, but in case of stabile external temperature. If an
exploitation temperature changes by 3 - 5 degrees, for best results it is better to repeat the
calibration.
Back to Top
Q7: I changed the EPP port and the software is OK now. Then I wanted to change the source
code in order to make it convenient to our own application software. But when I run the
DEBUG.exe, the wrong message appeared and said "cannot find the icon file". Where should I put
the icon file and how.
A: The icon file "evenTimer.ico" can be find in the distribution CD in the subdirectory ..\ Sample.
Put this file into directory, where you create your program modification.
But you can use own icon file or standard. If you use the LabWindows/CVI system to build the
program you should select the project menu item: Build/Target setting and:
- clear the field "Application icon file" - in this case the standard icon file will be used;
- double click on the field "Icon" and select any icon file; etc.
Back to Top
Q8: Could you please tell me something about TimeAr array? Such as: what does the format of
the TimeAr array, what are in this array and what does it for.
A: As you can see from the text of ”sample.c” the TimeAr is an example of a temporal array to
store measured results. In event timing process the program writes into the TimeAr time moments
(epochs) of registered events in picoseconds. At the end of timing (after predefined number of
events) the program replaces epochs in TimeAr by time intervals between the adjacent events for
mean interval calculation.
You should take into account that the epochs in TimeAr are shifted on constant offset to the realtime. To calculate this offset you must do SECOND pulses timing in “SYNC” mode (the source of
the SECOND pulses must be connected to the "SYNC IN"). In “SYNC” mode the program returns
the epoch (in internal scale) of SECOND pulses. A difference between the real-time of SECOND
pulse and returned epoch is the searched offset value. This offset is kept all the time the A032 is
powered and if a pause between measurements is not more than 90 minutes. The last is because
the internal counter has such modulo (5497.55813888 seconds). The module crossing is controlled
only in measurement process by the global variables dTimePre and dTimeTek (see the sources).
Back to Top
Q9: Could you please show me the use of some parameters? I'm reading ServSet.c, Network.c
and Appclient.c files. Almost all functions in these files have the same paremeters, such as panel,
control, event, callbackData, eventData1 and eventData2. I knew the meaning of the first two
parameters, but I was puzzled about the last four, and I can't find the definitions about them.
Could you tell me some more details?
A: All answers on your questions are in LabWindows/CVI help. For more information you can refer
to LabWindows/CVI Manuals.
In A032-ET DEMO programs the main event value, which is used is the event = 1 (it’s name is
EVENT_COMMIT). It is the event which is generated by LabWindows/CVI after you release the
mouse left button at any panel button. So the called CVIcallback, corresponding to this panel
button, can execute needed operations on this button clicking. Others events are used only in case
of visualisation control.
Parameters callbackData, eventData1 and eventData2 are not used at all. But you can use these
to send data into CVIcallback function (eventData1, eventData2) or to get data from this function
(callbackData).
Back to Top
Q10: We are trying to use A032-ET device in our system, and there are some questions.
How long does it spent from starting to get data in device FIFO buffer to finishing it? Can it be over
in 50ms? We found it cost too much time to get data, and it is hardly to arise the rate for this
reason.
A: Are you speaking about the direct interface to A032-ET (Sample.c using) or through the
network (Client – Server)?
In the first case you can check and get the data from FIFO in microseconds after an event is
logged.
In the second case the time depends from user-defined parameters and network delays.
In A032.1 option the user sets two parameters (see Manual for details):
- Amount M of TD-blocks - FIFO buffer size on 204, 102, 50 or 25 events; and
- Monitoring period T - the periodicity of FIFO buffer checking (from 10 ms).
As result the Server program checks every T milliseconds the presence of the M events in the
FIFO buffer and send data to the Client only after the M events are logged.
As result the TIME to get the data is: TIME = (M / F ) * T, where F – is the mean frequency of
events at both device inputs.
Back to Top
Q11: And there is another question, how many seconds does it run in A032 before it is cleared? Is
that 1.5 hour (5400 seconds)? And every second the A032 device run matches only one UTC time,
is it? Another question, the time in A032 will be set to zero after scaling, is it? And all data in A032
is cleared, FIFO buffer is empty, right?
A: The “rough” time counter in A032 is working continuously all the time the device is powered. It
is cleared only in power-up moment. So the “rough” time is the number of 10 ns intervals and is
logged as 39 bits value. This counter modulo defines the maximal continuous time which is 10 *
2^39 ns (1.527… hrs). But (as you can see from the Sample.c text) the program controls, if the
current epoch of the event is less than the epoch of the previous event, and increases the time
modulo addendum at 1 counter modulo. So the time between two events should not be more than
1.5 hrs or you should repeat the “Time synchronization” procedure.
A032 matches UTC time only in “Time synchronization” procedure. In this procedure the offset
between rough time counter and UTC is calculated. This offset is used all the time until next
synchronization. It is supposed that the 10 MHz reference is formed from the same UTC.
Scaling is the graduating procedure for time interpolator, defining the precise time of the event in
10 ns interval. Not any clearing is necessary for A032. But when the new measurement (in any
mode) is started the program (see Sample.c) initializes FIFO by Master Reset (you can view that
as FIFO clearing).
Back to Top
Q12: We have bought your product A032-ET, now I have questions want to ask you. Can I get
the time-tags one by one, not cumulated to 25/50/102/204? Can I get the time-tags from the A032ET via EPP not via TCP/IP?
A: Did you buy the SAMPLE program for A032_ET software development?
Answers on your questions are YES, only if you had bought the SAMPLE.
For the Client DEMO subsystems (and corresponding Servers) the answers are NOT.
Another version of subsystems, which will allow to get the Time-tags one by one (via TCP/IP), is
under development.
Back to Top
Q13: On distribution CD there is “SAMPLE” directory with programs. These are designed for
standalone use directly to EPP correct? (no server/client). This is interesting - because I would like
to talk directly to A032-ET via EPP - and not use client/server. This is possible correct? Is there
programming manual for direct EPP interfacing?
A: You are right. This is the example of program to talk directly with the A032-ET. But the example
is built in LabWindows/CVI. If you have LabWindows you can directly load the project and run the
sample. In case of other Development Kit for C you should rebuild the standalone from the text
sample.c. Some operators and include-files requires to be replaced by the equivalents. The text is
fully commented and I think you will understand it. The directory contains the document which
describes the direct EPP interfacing to A032-ET.
Back to Top
Q14: I would like to use Linux on the computer that will provide EPP interface. Have you ever built
a driver for Linux for the Server Programs? If not, then would you be willing to provide the source
code for the Server programs so I can rebuild it to run on Linux please. This will mean we can use
the Client software you provided without any further development. What do you think?
A: I regret to say we aren't working with Linux.
The Server programs have the TCP/IP interface and exactly this interface is provided for users.
The interface is described in documentation (ANNEX A of Manual) and examples of interface
implementation are presented in source codes of the Client programs.
The example of program in C to work directly with A032-ET via Parallel Port is the SAMPLE
program. Program is clearly structured and all blocks are commented. It has the minimum
nonstandard utilities. I think there are included all functions, which are needed for own system
design.
The sources of Server program can be provided on the base of some general agreement between
our institutions. We already have few such agreements. Such agreement is the formal basis for us
for informal collaboration with partners. These agreements don't suggest additional problems (no
trying supervising and formal reports) but in many cases can be useful to solve specific task. If
you'll agree in principle, I can send you a draft of such possible agreement.
Back to Top
Q15: We have the new software to provide the A032-ET on Linux server working.
One issue we do not fully understand is your concept of synchronizing time.
How do you synchronize the A032-ET without sending it time from the GPS?
There is some offset value stored in the server – correct ? How does this work.
I have set-up both the computers (Server- Linux and Client- Windows) with the same local time
clock value (within the possibilities of using keyboard commands).
I also have connected a GPS with 1PPS to the A032-ET.
When I do a “sync” command on the Client I get the message:
Synchronization warning !
Time Difference on Server = -12
What does this really mean?
A: Current synchronization concept is very simple. At the beginning an epoch of 1PPS pulse is
tied to Server PC system time (offset under second). Server system time is sent to Client PC and
compared with Client system time. Exactly this difference is shown in message (in seconds). The
system time is got by function GetSystemTime (&iHH,&iMM,&iSS) both in Server and Client. Client
(user) can add or subtract the number of integer seconds and this correction is transferred to the
SERVER which correspondingly will correct all calculated epochs.
We intend to connect a GPS device to the Server PC to know the exact time, but it is under
development.
Back to Top
Q16: If I want to use two ETs in one PC, how to complish the job? Need another software? Can I
use ET in PC with Dos Operating System? Need another software?
A: You can use two A032-ETs in one PC, having MS Windows and two Parallel Ports. We do that
very often. But you must run the programs for different A032-ET s in different directories, because
all service files: MasterSc*.bin, corMicro.bin and param*.cnf have the identical names but
different contents. TCP ports are unique for each device by default. Don’t forget to write the right
Parallel Port addresses in files param1.cnf and param2.cnf for corresponding A032-ET.
In respect of DOS you need the Sample program. Furthermore, with the Sample program you can
make a real-time software, integrating both A032-ETs. For own Timing System development the
Sample program is preferable. All our customers, which integrate A032-ET into own Timing
Systems, purchase the Sample program.
Back to Top
Q17: Is the file CorMicro.bin ET-device-dependent? I.e. do we get such a file for each A032-ET? I
am currently modifying the PC programs to allow for two devices. So I needed to know if each
A032-ET needs its own corMicro.bin file.
A: We provide each A032-ET with unique device-dependent files:
TestPerf.pdf, corMicro.bin, MasterSc1.bin, MasterSc2.bin.
Last two files are only for check and you change these every time, when you do the scaling
procedure. The data from corMicro.bin are used for nonlinearity correction “in-fly” and to get these
data the special procedures, equipment and much time are necessary.
But, as you can see from the Sample.c, the correction depends on delay from the previous event.
For delays more than 300 ns the differences in correction for two A032-ETs are not more than 1
ps. By the way, if the adjacent events will be distanced at more than 3000 ns you can drop out the
correction at all.
Back to Top
Q18: I want to know if the event epoch got from A032-ET is synchronous to GPS? or the epoch
have a expected delay with GPS? I want to know the veracity of the epoch.
A: ET-device has two inputs for synchronization with GPS:
- input EXT REF – the 10 MHz reference from GPS; and
- input SYNC – pulse per second - the 1PPS from GPS.
All timing processes in ET-device are synchronized with EXT REF, including the time
measurement for events, coming in the input SYNC. ET-device has internal time scale, but after
the 1PPS event measurement (“Time synchronization” procedure) an offset between the internal
scale and GPS scale is calculated. This offset value is used for all following measurements. But
the fixed Delay persists, because there always are differences in signals delays, depending on
connecting cables and etc.
Back to Top
Q19: The A032-ET has been used in our SLR system for a long time and it works well. The laser
firing frequency for all satellite will be increased over 10Hz. I have a question about the
specifications of A032-ET. What is the shortest interval between the time of input pulse and the
time data is available to be read? ns or us?
A: The time between the input pulse (negative edge) and flag appearance (positive edge) at the
pin 12 of Parallel Port (or bit 5 in Status Register) is 130 - 140 ns. This flag means that the data are
ready and can be read. But the program reaction on these events takes much more time as you
understand. In our experiments we could not poll the Status Register with period less than 2 us.
More over this time is not stable and depends on Windows operation.
Back to Top
Q20: We have been using two A032-ETs for several months using the direct communication
through two parallel ports very successfully. We used your Sample.c sources converted to Fortran
and modified them to handle more than one event timer in DOS PC.
So far we operated the event timers in mode 2, i.e. start/stop mode. Recently I have started to
program our system to use the mode 1, i.e. true event mode and found that I have to call
ReadOPT() twice to get the event time in sequential cycles? I do not understand what the flag
preEF does.
A: It is necessary to clarify the preEF variable:
The flag preEF is initialized by subroutines StartOpt1() or StartOpt2() and controlled by the
ReadOpt() in dependence on the state of the ET-device buffer memory. This memory requires two
dummy readings to shift the first data (2 bytes) into output. This occurs each time when the
memory is emptied by reading or by Reset. If you get from ReadOpt() the return code = 0 it is
mean that you attempted to read empty memory and to get the next new data you have to call
ReadOpt() twice.
The difference between modes: In mode 2 you stop reading when the memory becomes empty,
but in mode 1 you repeat reading up to the end of measurement. If you are reading quicker than
the data are coming it is possible the emptied memory case and the dummy readings are
necessary to get the next data.
Back to Top
Q21: Can I prevent the event timer (set to mode 1) to accept events for a certain time? Is there
something like a "Stop accepting events" command?
A: There is one undocumented possibility. You may attempt to use the next commands:
outp(PORT+2, 0x05); // EPP write mode (direction)
outp(PORT+3, 0xD0); // reading mode with closed inputs
To reopen the inputs do the command:
outp(PORT+3, 0x10); // Buffer memory reading mode.
Back to Top
Q22: I am still trying to use our A032ETs in mode 1, i.e. as true event timers. Basically it works but
I still run into troubles. It seems now that the counter sometimes looses synchronization, i.e. the
epoch computed from the internal epochs plus synchronization correction sometimes becomes
completely wrong and stays wrong. A new synchronization solves the problem till the next time.
A: You have to take into account, that in function ReadOpt() the predecessor time (variable
dTimePre) and moduloes addendum (variable iTimeCycles) are initialized every time you start
new measurement (checking of variable eventNumb=0). In function StartSync() these variables
are not used at all. You have to tie up all sequential measurements and 1PPS measurements.
The simplest way is to include in StartSync()
dTimePre = vvv*10000.0; (because it should be in picoseconds),
iTimeCycles = 0;
and do the synchronization calling this function before each SLR session.
To prevent the variables initialization in ReadOpt() bring out the condition:
if (eventNumb == 0)
{
dTimePre = …;
iTimeCycles = 0;
}
leaving the "else" part.
In case if the counter rolls-over in synchronization process you may repeat the synchronization.
Remember, that a time without any measurements (without dTimePre control) could not be more
than 1.5 hr.
Back to Top