Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Experimental Control
 Getting machine time in CIGAL?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

marion
BIAC Alum

19 Posts

Posted - Apr 25 2006 :  4:43:35 PM  Show Profile  Reply with Quote
Is there any way to get CIGAL to give you the machine time (or just the current actual time) at which you start a task running? If CIGAL doesn't do this, is there any other way anyone knows of to record this very acurately (ie on the order of milliseconds)?

jim.voyvodic
BIAC Faculty

138 Posts

Posted - Apr 25 2006 :  5:38:38 PM  Show Profile  Reply with Quote
CIGAL records all events with 20 micosecond accuracy, relative to each other. These times are all stored in the PDIGM output file. The TIME command in CIGAL gives the current date and time with millisecond precision (relative to the acuracy of the clock setting.)
The date and time a paradigm finished are recorded (date hh:mm) in the parameter record of the PDIGM output file, but that is only accurate to a minute.

Presumably you want the computer's idea of current time at the moment the paradigm began so that you can relate CIGAL events to some outside clock. This can be added but it's not clear to me how you would synchronize the clocks themselves. CIGAL tends to depend on direct interactions with other devices to ensure synchronization, since computer clocks are typically not well synchronized and the clock calibration issue has always been a problem.

The new version of CIGAL (to be installed within the next week or so) now records the computer's idea of day time (to the millisecond) at the moment that ShowPlay's 20 us clock begins to tick. I will record that time in the PDIGM output file alongside the LTIME0 value, which is the time in 20 us clock ticks when the paradigm actually began (1st scanner image usually). With thse numbers you will then be able to convert any clock tick time to day time.
Jim
Go to Top of Page

marion
BIAC Alum

19 Posts

Posted - Apr 26 2006 :  09:45:39 AM  Show Profile  Reply with Quote
Thanks, this helps a lot. I want to relate the time of CIGAL events to the machine time of another BIAC computer in the same room, I don't know whether that means they should be well-synchronized or if they'll still be off.
Is there a way to incorporate the TIME function into a .ppf or something so that the start-time will be recorded in one of the output files? (Sorry if that's obvious, I don't have much experience wiht this stuff yet)

Thanks again,
-Brian

Edited by - marion on Apr 26 2006 09:47:11 AM
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - Apr 26 2006 :  11:18:50 AM  Show Profile  Reply with Quote
There are lots of ways to approach this issue.
The most accurate is still to have the 2 computers talk to each other directly. What are you going to be doing on the other computer? Is the software you are running there capable of sending a time-stamped signal out a serial port? If so, you can have CIGAL
monitor that serial port and record when it receives a signal. Another way to synchronize the two computers would be to briefly run CIGAL on the other computer, before or after your other software, and let it send that computer's clock time in an explicit synchronization message. That way you would have both clock times for the same moment (accurate to a millisecond or so) and could see how similar they are. Then any other real clock times on either machine could be compared.

You can put any CIGAL commands you want into a PPF file, but simply recording the clock time there (e.g. "time > timelog.txt") won't help much. When I install the new version
(CIGAL 4.81.26) next week I will also post a link to a web-site describing the new features, including how to read the time log.

Jim
Go to Top of Page

marion
BIAC Alum

19 Posts

Posted - Apr 26 2006 :  11:34:14 AM  Show Profile  Reply with Quote
Yeah, it sounds like trying to set up a signal over a serial port is definitely better than trying to synchronize different machine clocks; I'll talk to Imran about setting this up with the ASL eye tracking software.

Thanks very much for your help.

Edited by - marion on Apr 26 2006 11:34:52 AM
Go to Top of Page

deshmukh
BIAC Alum

40 Posts

Posted - Apr 26 2006 :  11:41:39 AM  Show Profile  Reply with Quote
Unfortunately the ASL software has no protocol for communicating with another machine via serial port to trigger it's recording action. It uses the serial port to communicate with it's camera control and digital processing box. Synchronizing machine clocks seems to be the only option.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.42 seconds. Snitz Forums 2000