Measurement program with manually indicated phases

The following PCC program was designed for use in an experiment where the operator would press a key to indicate the beginning of each stage. It is designed so that a mark is seen on the screen a given period after the beginning of particular stages, as an aid for the operator. The program also causes display of heart rate on the measurement screen.

Analysis of data recorded with this program.
Stimulus generation program language.

Measurement channels are produced for Skin Conductance, Electrocardiogram, Inter-Beat-Interval (Heart Rate) and events detected when a function key is pressed. The top four program lines open these measurement channels. The SC4 and EKG lines should have the keyword 'hires' added if the A-D converter in the system is an MC16. Other measurement channels could be added.

The first two lines under the label 'MAIN' have the effect of converting the reading from the Interval Timer which is Inter-Beat-Interval (I.B.I.) in milliseconds into Beats per Minute (BPM). Heart Rate is the reciprocal of Inter-Beat-Interval, thus the '/' in the line HR = 60000 / IBI. 'HR' is a user variable. There are 60,000 milliseconds in one minute, thus the reciprocal of the I.B.I. is multiplied by 60000. The letters 'ibi' return the value read in on a channel opened as '$measure ibi', i.e. the reading from the Interval Timer (similarly, the letters'sc4' would return the reading from the Skin Conductance device, etc.) The result of the equation is put into variable 'HR'.

 Choosing measurement channels.

The next line ' locate 30,1: print HR' is two commands on one line separated by the colon. The locate statement determines the position where the print statement will take effect on the measurement screen, in this case 30 lines down (about half way) and on the first column (at the left). Thus this line prints the Heart Rate on the screen at a position which is near to the I.B.I trace.

 Download just the latest SAM1.EXE and PSYLAB7.EXE programs December 2004

 t1 = -1

 if key > 0 then gosub STIM
 if time = t1 then mark 10
 goto MAIN


 if key = 4 then t1 = time + 300 '5 minutes bl
 if key = 1 then t1 = time + 300 '5 minutes
 if key = 2 then t1 = time + 900 '15 minutes
 if key = 3 then t1 = time + 300 '5 minutes
 mark 10
 latency = 0
 delay until latency > 1
 key = 0

Back to PSYLAB Hardware
Back to PSYLAB Software
Back to Home page