![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Choosing measurement channels in the PCC file. The $measure 'metacommand' is placed at the top of a PCC measurement program to open a channel of measurement. The metacommand is repeated to add further channels, as seen in some of the example measurement programs. The following section is taken directly from the PSYLAB user manual, unfortunatley it is not presently formatted. 1 February 1999. |
|||||
$MEASURE device [address (A-D converter channel parameter)] [device qualifier] [hires] [digital (amplifier rear switch parameter)] [display off] [scale (min level) (max level)] [ep] ["(label)"]
Defines measurement channels. Device must be chosen from the table below, other parameters are set by default unless specified. Parameters (except device) may be omitted. There must be a space between key words and each parameter. Device becomes the label that is seen next to the channel, unless an alternative label is assigned. function that returns the absolute measure from that channel, expressed in units of the measure (e.g. if there is an EMG channel, "EMG" becomes a function that returns the instantaneous uVolt level of that channel).
Typical format:
$measure sc4 hires $measure sc4 address 8 hires "SCRIGHT" $measure pulse ppa2 hires $measure ibi $measure emg hires $measure emg address 4 bio2 hires "EMG#2"
Device automatically conveys a default address which will be used as long as there is only one of that particular device in the system PSYLAB expects to find the relevant measuring couplers plugged into the correct (default) channels of the A-D converter, which is how the equipment will have been configured on dispatch. A table of these default addresses is given in the section describing the address parameter below.
DEVICE Description SC4 EDA SC4 Skin Conductance Coupler PULSE FPA Coupler to measure Pulse Wave-form EMG Bio-Amplifier to measure EMG EKG Bio-Amplifier to measure EKG Wave-form EEG Bio-Amplifier to measure EEG Wave-form RSPWAVE BDG Bridge Coupler to measure Respiration Wave SEX BDG Bridge coupler used with Barlow Gauge TEMP Temperature Coupler IBI Interval Timer to measure Inter Beat Interval RSPINVL Interval Timer to measure Respiration Interval PTT Interval Timer Coupler to measure Pulse Transit Time TIMER Interval Timer to measure Reaction time etc. BIO Bio-Amplifier to measure other signal (no default setting) BDG BDG Bridge coupler for other signal (no default) DCAMP DC Coupler (signal conditioning) for signal from other eqpt MC8 Analog channel for extl signal 8 bit resolution (no default) MC16 Analog channel for extl signal 12 bit resolution (no default) DIASTOL Diastolic blood pressure from BP device (RS232) SYSTOL Systolic blood pressure from BP device (RS232) EVENT Event channel (see from selection of event devices) $measure device selection Data measured from the device are converted by software into appropriate absolute units, by registering the scale switch position. If this switch is changed in mid-recording, the new position is registered and wave-form scaling adjusted accordingly. In the case of SC4 and Temperature couplers, in addition to registering the position of the scale switch, a balance level is controlled by software.
Where an ‘external’ signal is directly connected to an A-D converter channel, mc8 and mc16 may be specified. In this case straight A-D converter data (numbers with the range +/- 128 or +/- 2048) will be recorded. PSYLAB will not look for a scale switch setting and will not try to pre-scale the data.
Device Qualifier PSYLAB systems supplied after January 1998 may include new style Bio2Amplifiers and PPA2 Photoplethysmograph amplifiers. These devices convey filter settings as well as gain to the computer which requires that keywords bio2 or ppa2 (as appropriate) be placed in the $measure command line before the hires keyword (if used).
Event Devices One or more event channels may be opened. Always put a label in the command line (e.g. $measure event stimin "LABEL"). One of the following parameters may be added to the $measure event metacommand line to make it automatically register output from the specified device:
key registers the value of a function key press x 10 stimin registers BIN8 TTL inputs stimout registers when any PSYLAB stimulus device operates
$MEASURE event key This type of event channel will be 0 to start with, but if any function key between f1 and f10 is pressed it will jump to 10 times the number of the function key and remain there until another function key is pressed or until the statement key = 0 is encountered. Be sure to allow a definite delay between the key press and execution of a key = 0 statement, otherwise the event will not be registered in the measured event channel. For example:
$measure event key "KEYPRES"
MAIN if key > 0 then gosub STIM goto MAIN
STIM latency = 0 delay until latency > 1 key = 0 return
If the program does not contain a section with the statement key = 0 to re-set the event channel to zero after a given time, the trace will remain at the value of the last key pressed. Only function keys 1 - 10 may be used.
$MEASURE event stimin This event channel will register the value of the TTL inputs of a BIN8 stimulus device. As TTL levels normally float high, the channel will register 255 if nothing is connected to the device. If the 8 input is connected to ground, or held low by some TTL compatible device, it will register 127 (255-128), the 7 input will result in 191 (255-64), etc.
$MEASURE event stimout This event channel will register the first parameter sent to any of the PSYLAB stimulus devices using commands such as ( tone relay bin8 shock noise ). Thus the command tone 200,150,1 will result in the event channel rising to 200 for 1 second, co-incident with the tone. If two devices are operated together, the last one to be operated will control the event channel, but if it finishes before the first one, the level will go back to the level of the first device.
$measure [address (A-D converter channel parameter)] This parameter is set by default, and does not need to be specified unless more than one of the same type of measure is in the system. Address refers to both the analog channel number used to connect output from a coupler (e.g. MC8 or MC16 channel number) and the setting of the rear selector switch on each coupler, used by the digital communication system to convey amplifier scale setting. The parameter is specified immediately following the key word address separated by a space or comma. If the MC16 is used, the hires parameter must be added after address (e.g. $measure emg address 4 hires). Default address values are given below.
Address refers both to the analog channel number (e.g. the socket on the front of MC8 or MC16) and the setting of the 16 position selector switch found at the rear of the coupler. This rear switch allows the software to communicate the setting of the scale control for each coupler. If this is not communicated software will not show a scale reading next to the channel, and wave-form data will be impossible to evaluate.
Device default address switch setting and A-D converter channel no --+-------------------------------+------- SC4 1 PULSE 2 EMG 3 RECTEMG 3 EKG 6 EEG 7 RSPWAVE 4 DCAMP 8 TEMP 5 IBI * 2 PTT * 6 SEX (sexual response) 7 TIMER (reaction time etc.) * 10 *These addresses use a separate communication system and therefore may share the same number as other devices, e.g. $measure pulse may be used together with $measure ibi even though they both use address 2).
Normally the analog channel number and the rear switch number are the same. In special circumstances the switch setting may be different to the A-D converter channel number, in which case an additional digital parameter can be stated after the address parameter to specify the switch setting. This is the case with multiple EEG or EMG measurement, where one switch on the control unit sets the scale (gain) for many channels. Example:
$measure emg address 8 hires digital 8 $measure emg address 9 hires digital 8 $measure emg address 10 hires digital 8 $measure emg address 11 hires digital 8 etc.
If a system contains devices not set to normal default addresses, a PCC program should be supplied with the system that demonstrates the correct addresses for that system. This program may be used as a sample for the format of $measure metacommands. For default devices, the only parameter that must be put in the $measure metacommand line is device. The hires and digital parameters, if used, must follow after any address parameter (e.g. $measure emg address 4 hires digital 8).
$measure [hires] The HIRES parameter must come after an address parameter in the $measure metacommand line. If hires is included in the metacommand line, PSYLAB will assume that output from the amplifier is plugged into an MC16. Otherwise, MC8 is assumed. The same default channel numbering applies (i.e. emg is channel 3 unless specified otherwise).
$measure [digital (rear switch setting parameter)] In the case where the A-D converter channel number must differ from the switch setting on the amplifier, the digital parameter may be used to inform the system of the correct amplifier setting. This will inevitably be the case for the multi-channel amplifier device EEG8, which has a single control unit, but uses many analog channels. For example, where MC16 channels 8, 9, and 10 are used, and the EEG8 control unit is set to switch position 8:
$measure eeg address 8 hires digital 8 $measure eeg address 9 hires digital 8 $measure eeg address 10 hires digital 8
$measure: Interval Timer Addressing In the case of Interval Timer coupler address, the same address is used as that used for the amplifier it is connected with. For example, if an Interval Timer is used with a Bio-amplifier, it is assumed for default purposes that it is being used for Pulse Transit Time (R-P interval). PSYLAB will expect the Bio-amplifier to be set to address 6 (EKG default) and the Timer also to address 6. If the Interval Timer connected to a Bio-amplifier was required instead to measure IBI rather than PTT using EKG as the source, the Interval Timer address switch could be changed to position 2, different from that of the Bioamplifier feeding it. Then, the default parameter $measure ibi could be used without an address parameter. Alternatively it could be left at address 6, and the parameter included e.g. $measure ibi address 6. The Interval Timer coupler should always be given an even address setting.
$measure ekg ' bioamp set to address 6 linked to interval timer $measure ibi ' interval timer set to address 2 $measure metacommands to measure EKG from an Interval Timer connected to EKG wave
The Interval Timer coupler used for reaction time may be used independently from a wave-form measuring coupler for purposes such as reaction time measurement using the start and stop inputs. In this case, $measure timer may be used and the Interval timer set to address 10. Alternatively, set the address selector to any address unused by any other coupler and put the address parameter in the $measure metacommand line (e.g $measure timer address 14 ).
$measure [scale (min level) (max level)] This applies to interval measurement channels using the Interval Timer coupler for purposes such as reaction time measurement or where unusually high heart rate may be expected as in heart rate. In this case the required scale for the histogram type display created from the timer coupler output will be different from the default range which is set for normal conditions as follows:
Heart Rate (IBI)500 mS to 1500 mS (120 - 45 BPM) Pulse Transit Time (PTT)200 - 400 mS Respiration Rate (RSPINVL) 2000 - 8000 mS Reaction Time (TIMER) 0 - 255 mS Default scale ranges Different scale can be specified for any device as demonstrated in the following example:
$measure ibi scale 300 600
This will give a range of IBI between 300 mS and 600 mS, 200 BPM to 100 BPM (appropriate for small babies).
$measure [Display off] This parameter cancels graph display during measurement but leaves the channel active. This may be required because it may be undesirable to display all signals, as this may confuse the operator by over crowding the graph display. A maximum of 10 channels can currently be displayed simultaneously without label overlapping occurring.
*$measure ["(LABEL)"] A word or group of up to 7 upper case characters may be placed between inverted commas. This will replace the label normally seen next to the channel in the display and will change the name of the function used to access data from that channel, e.g.:
$measure sc4
will generate the function sc4 which will return the instantaneous absolute reading from the SC4 channel. The letters SC4 will be seen next to this channel in the graphic display of waveforms:
$measure sc4 "SCRIGHT"
will generate the function scright instead of sc4 and SCRIGHT will be seen next to the channel. Where more than one channel of the same type exists, the label system should always be used to uniquely identify each channel.
The label (channel descriptor) becomes a function that returns the absolute measure from that channel, expressed in units of the measure (e.g. if there is an EMG channel, "EMG" becomes a function that returns the instantaneous uVolt level of that channel).
$measure [EP] This parameter is used when on-line display of averaged evoked potentials is required. The display plotted will not directly represent data as read from the channel but will be averaged data taken for a number of points (440 points normally or 640 points if mode 3 is used) after the interpretation of the command erpcue. This command should be put directly after the command which operates the stimulus device which is intended to cause the EP. Please refer to the example in section 4. Averaged Evoked Potentials (EP): Measurement. See also: erpstim, erpcue, erpstart, $mode 3, $force, $tempfile. |
|||||
Back to PSYLAB Hardware |
|||||