Service Manuals, User Guides, Schematic Diagrams or docs for : Keithley KPCI 24461A(KPC_TM_252CKPC488_252C2TM)
<< Back |
HomeMost service manuals and schematics are PDF files, so You will need Adobre Acrobat Reader to view : Acrobat Download
Some of the files are DjVu format. Readers and resources available here : DjVu Resources
For the compressed files, most common are zip and rar. Please, extract files with Your favorite compression software ( WinZip, WinRAR ... ) before viewing.
If a document has multiple parts, You should download all, before extracting.
Good luck. Repair on Your own risk. Make sure You know what You are doing.
Image preview - the first page of the document
>> Download 24461A(KPC_TM_252CKPC488_252C2TM) documenatation <<Text preview - extract from the document KPC-TM
and
KPC488.2TM
Trigger MasterTM
Interfaces
User Guide
for the
KPGTM and KPC488.2TM
Trigger Master""
--
Interfaces
RwisionA-FebntaylSS8
Copvrishfl Kdtbley Data Acquisilicm 1993
ParI Number: 24461
KEITHLEY DATA ACQUlSlTiON - Keithley MetraSyWAsyst
440 Myles Slandiih Blvd., Taunton, MA 02780
TEL 508/880-3000, FAX 508/880.0179
-3-
Warranty Information
All products manufactured KeithIeyDataAcquisitionarewarrantedagsinst
by defectivematerials
and
workmanship foraperiodofone yearfrom thedateof deliveryto theoriginalpurchaser.Any product
that is found to be defectivewithin the warrantyperiod will, at the option of the manufacmrer, be
repairedor replaced.This warnutty doesnot apply M productsdamagedby improperuse,
Warning
Keithley Data Acquisition assumes liability for damagesconsequent
no
lo the use of tkii product. This product is not designedwith
componentsof a level of reliability suitable for use io life support or
critical applications.
Informationfurnishedby Keithley DataAcquisitionis believed beaccurateandreliable.However,
to
Keithley Data Acquisition assumes responsibilityfor the use of such information nor for any
no
infringementsof patentsor other rights of third partiesthat may result from its use.No licenseis
grantedby implicationor otherwiseunderany patentrights of Keithley Data Acquisition.
Copyright
All tights reserved. part of this publicationmay be reproduced,
No storedin a retrieval system,or
transmittedin any form by any means,electronic,mechanical,photoreproductive,recording, or
otherwisewithout the expressprior written permission Keithley Data Acquisition.
of
Note:
Keitkley MetraBy@`, Trigger Mast@`, and Trigger-LiokTMare trademarksof Keithley Data
Acquisition.
BASKI?' is a trademark DsrtmouthCollege.
of
IBM@' and Micro Channel Architecture'" are registeredtrademarksof International Business
MachinesCorporation.
PC, XT, AT, and PSh sre trademarks InternationalBusiness
of MachinesCorporation.
MicrosofttR'is a registeredtrademark Microsoft Corporation.
of
Turbo C'"' and TurboPascal'*' sre registeredtrademarks Borland IntemationaI.
of
-4-
Contents
CHAPTER 1 - INTRODUCTION
1.1 General Description l-l
1.2 Distribution Software 1-4
1.3 Specifications I-4
1.4 Trigger-Link 1-5
CHAPTER 2 - INSTALLING Trigger Master
2.1 Introduction 2-1
2.2 Inspecting the Boards 2-1
2.3 Setting Up the KPC-TM Board 2-2
2.4 Setting Up the KPC488.2TM Board 2-3
2.5 Installing Trigger Master 2-4
2.6 Running PLAYDOS.EXE or PLAYWIN.EXE 2-4
CHAPTER 3 - USING THE Trigger Master DRIVER
3.1 Introduction 3-1
3.2 Using the Driver 3-I
Using the Driver with BASICA 3-1
Accessing the Driver from C 3-2
Accessing the Driver from QuickBASIC and VisualBASIC 3-2
QuickBASIC 3-2
VisualBASIC 3-3
Accessing the Driver from TurboPascal 3-3
3.3 STCINIT 3-4
Calling STCINIT from BASICA 3-4
Calling STCINIT from C 3-5
Calling STCINIT from QuickBASIC and VisualBASIC 3-5
Calling STCINIT from TurboPascal and TurboPascal for Windows 3-5
3.4 STCSET 3-6
Calling STCSET from BASICA 3-6
Calling STCSETfmm C 3-6
Calling STCSET from QuickBASiC and VisualBASIC 3-7
Calling STCSET from TurboPascal and TurboPascal for Windows 3-7
3.5 STCCMD 3-7
Command Syntax 3-8
General Information 3-8
Line Numbers 3-Q
Extensions 3-9
Integer Arguments 3-Q
Time Scales 3-10
Contents
Sending Commands in the Programming Languages 3-l 1
Calling STCCMD from BASICA 3-11
Calling STCCMD from C 3-l 1
Calling STCCMD from QuickBASIC and VisualBASIC 3-12
Calling STCCMD from TurboPascal and
TurboPascal for Windows 3-12
The Command Set 3-13
ARM 3-13
BEGIN 3-14
CONT 3-14
DO 3-15
END 3-15
FLAG 3-15
HALT 3-l 6
LOOP 3-16
TRIG 3-16
WAIT 3-17
X 3-17
3.6 STCSTAT 3-18
Request Syntax 3-19
General 3-19
Extensions 3-19
Making Requests in Programming Languages 3-19
Calling STCSTAT from BASICA 3-20
Calling STCSTAT from C 3-20
Calling STCSTAT from QuickBASIC and VisualBASIC 3-20
Calling STCSTAT from TurboPascal and
TurboPascal for Windows 3-21
Values Returned by STCSTAT 3-21
Interpreting Values in BASICA 3-22
Interpreting Values in C 3-24
Interpreting Values in QuickBASIC and VisualBASIC 3-25
Interpreting Values in TurboPascal and
TurboPascal for Windows 3-26
The Request Set 3-27
ARM 3-27
CONT 3-27
FLAG 3-28
LOOP 3-28
STATUS 3-29
TRIG 3-30
WAIT 3-31
-6-
3.7 STCLOAD 3-31
Calling STCLOAD from BASICA 3-31 -
Calling STCLOAD from C 3-31
Calling STCLOAD from QuickBASIC and VisualBASIC 3-32
Calling STCLOAD from TurboPascal and
TurboPascal for Window 3-32
3.8 STCDUMP 3-32
Calling STCDUMP from BASICA 3-32
Calling STCDUMP from C 3-33
Calling STCDUMP from QuickBASIC and VisualBASIC 3-33
Calling STCDUMP from TurboPascal and
TurboPascal for Window 3-33
CHAPTER 4 - PROGRAMMING EXAMPLES
4.1 Introduction 4-1
4.2 BASICA Language Example 4-2
4.3 C Language Example 4-7
4.4 QuickBASIC Example 4-11
4.5 TurboPascal Example 4-15
CHAPTER 5 - CREATING PROGRAMS FOR Trigger Master MEMORY
5.1 Introduction 5-1
CHAPTER 6 - CREATING A BACKGROUND DATA ACQUlSllION SYSTEM
FORDOS
6.1 Introduction 6-1
6.2 The TSR Structure 6-2
NOKPC488 and MISSINGGPIBDEV 6-3
STCRUN 6-4
WAITONSTC and JMPWAITSTC 6-5
WAITONGPIB and WAITONAUX 6-5
STCFLAG 6-5
STCLOG 6-6
STCEXIT 6-6
6.3 A TSR Log 6-7
6.4 A TSR Example 6-8
6.5 Creating a TSR for C 6-11
- 7.
Contents
APPENDIXES
Appendix A - Trigger Master ERROR MESSAGES
Appendix 6 - COMMAND QUICK START
B.l Generate Trigger Outputs B-1
8.2 Waft For Trigger Inputs B-l
8.3 Enter Program Mode B-2
0.4 Set Up and Terminate Program Loop (Program Mode Only) B-2
8.5 Generate a Wait (Program Mode Only) 0-2
B.6 Track Program Execution and Generate interrupts B-2
B.7 Exit Program Mode B-3
8.6 lnftiate Program Execution B-3
B.9 Halt Trigger Master Execution B-3
B.10 Continue Execution of Halted Program B-3
Appendix C - REQUEST QUICK START
C.1 Check Remaining Trigger Inputs Established by
ARM Command C-l
c.2 Check Remaining Trigger Outputs Established by TRIG Command C-l
c.3 Check the Actual State of the Trigger Lines C-l
c.4 Check Time Remaining Before Next Trigger C-l
C.5 Check Program Progress c-2
C.6 Check Remaining Loop Count c-2
c.7 Check Remaining Delay Time c-2
-.s-
Chapter 1
INTRODUCTION
1.1 GENERAL DESCRIPTION
Trigger Masterm is a system trigger controller for instruments and data acquisition
boards with external triggering. Trigger Master supports a variety of trigger functions
occurring in data acquisition systems.Trigger Master monitors trigger inputs, creates
delays, and generatestrigger outputs.
An outstanding feature of Trigger Master is its ability to run programs from its own
memory and to generateinterrupts at appropriate stepsof program execution. This
allows Trigger Master, with some adjunct data acquisition hardware, to operate as an
autonomous data acquisition system in your personal computer (PC) while you use
your PC for other purposes,
Trigger Master is implemented on two boards:
. The KPC-TM board provides Trigger Master as a stand-alone plug-in board for the
PCru/XTn'/ATn"' computer.
. The KPC488.2TMboard combines Trigger Master with the high performance
KPC488.2ATGPIB interface to provide a standard interface with GPIB instruments.
Note: This manual describesTrigger Master. For information on the IEEE-488
functions, refer to the manual IEEE 488 InterfaceBoardswhich accompaniesthe
KPC488.2TMboard.
Figure l-1 is a block diagram of Trigger Master.
Physically, Trigger Master is equipped with an 8-pin MicroDIN connector which has 6
trigger lines and 2 ground lines. In addition to Trigger-Linkn' introduced later in this
chapter, the MicroDIN can connect directly to standard BNC connectors using the 8502
Trigger-Link Adapter.
Chapter 2 describesconfiguring and installtng the boards.
Trigger Master employs proprietary chips containing statemachines that run from an 8-
MHz clock. This allows Trigger Master to respond to a change of trigger inputs by
generating a trigger output within 1.25us. The state machine coordinates all functions
including the interfaces to Trigger-Link and the PC bus.
A PC program controls Trigger Master using 11 SCPI-like commands which a driver
transforms to microcode instructions, sending them to Trigger Master. Trigger Master
supports three modes of operation:
INTRODUCTION l-1
Figure l-1 Trigger Master Block Diagram
. One mode of operation, ImmediateMode,allows some commands to be executed
immediately by Trigger Master.
. The secondmode of operation, ProgrumMode, allows Trigger Master to store
commands in a 1-Kbyte program RAM as they are received for later execution.
Storing the program into RAM provides extremely powerful performance, since the
state machine can perform two level looping (one nested loop); for repeated
operations, the state machine uses available counters. This mode allows you to start
program storage and execution at any memory location, therefore allowing several
small programs to be resident in memory and allowing you to start them as
required.
. The third mode of operation, Run Mode,occurs while the Trigger Master executesa
program.
A user can generatetrigger programs using any of the following methods:
. Passcommand strings from the user program to the Trigger Master driver.
. Write trigger programs using an ASCII-output word processorand then compile the
programs with STCCOMP.EXE.
. Program interactively using PLAYWIN.EXE and PLAYDOSEXE, running,
respectively, from the Windows and DOS environments.
Any word processorthat provides ASCII output allows you to write Trigger Master
programs, store them in ASCII, and then "compile" the output using the STCCOMP.EXE
program. Chapter 6 describesthis procedure. The resulting "object" file is then easily
loaded into Trigger Master program memory and executed.
1 - 2 Trigger Master INTERFACES USER GUIDE
The Trigger Master driver supports up to four boards simultaneously. The driver
acceptsthe following commands:
ARM Set trigger input condition and wait for trigger
BEGIN Enter program mode
CONT Restarta halted program at the next step
DO Mark the start of a program sequencethat is to be performed as a loop
END Mark the end of a program mode sequencewith a HALT and return to
immediate mode
FLAG Write a value to a diagnostic flag register (to trace program execution)
HALT Halt Trigger Master operation
LOOP Mark the end of a program loop
TRIG Generatetriggers
WALT Cause a program to executea time delay
X Begin program execution
The program STCRUNCOBJ,described in Chapter 6, builds terminate-and-stay-resident
programs (TsRs)for programs written in C. These programs are driven by interrupts
generated by the Trigger Master; the programs can run in the background in a DOS
environment while you run other programs from DOS.
Chapter 3 describesthe PLAYDOSEXE and PLAYWIN.EXE programs which allow you
to become familiar with the commands and requests,test your hardware without doing
any programming, and generateTrigger Master programs for future execution.
PLAYDOSEXE runs in the DOS environment, while PLAYWINEXE executesfrom
Windows. Referto Appendix B for a quick start on the commands and Chapter 3 for a
detailed description of the commands.
In addition to sending commands to Trigger Master you can also request information
from Trigger Master. Trigger Master supports the following requests:
ARM Return information about the trigger detect circuitry
CONT Return the current Trigger Master program position
FLAG Read the value from the diagnostic flag register
LOOP Return the execution status of a Trigger Master program loop
STATUS Return the value from the Trigger Master status register
TRIG Return information about the trigger output circuitry
WAIT Return the remaining delay time
Refer to Appendix C for a quick start on the requests and seeChapter 3 for a detailed
description of the requests.Chapter 4 provides programming examples of the
commands and requestsin the supported languages.
INTRODUCTION l-3
1.2 DISTRIBUTION SOFIWARE
This manual refers to Trigger Master software as the Di.dribution Software. The
Distribution Software contains utility files and driver files. Chapter 3 discussesthese
1.3 SPEClFlCATlONS
Channels: 6 Input/Output
Basic Functions: Trigger Detection
Trigger Generation
Delay Generation
PC Interrupts
Micro Sequencer:
Modes: Program, Immediate, or Run
Looping: 2 Levels
Loop Repeat: 1 - 4096
Trigger Repeat: l-4096
Sequencer RAM: 1024bytes
Time Base Drift: 100ppm max
Trigger Input Pulse Width: 4OOnsmin
Trigger Output Pulse Width: 5us
Detection Latency: 900 ns max
Async Trigger Latency: 2.2 us max (trigger in to trigger out)
Programmable Delay: Range Resolution
1 us to 65.536ms 1 us
10 us to 655.36ms 1ous
100us to 6.5546set 100us
1 ms to 65.536set 1 ms
Trigger Connector: &pin microDIN
Modes: Sync, semi-sync (Trigger-Link), async
Power Consumption:
KPC-TM: 450mA @5Vmax
KPC488.2T2TM: 1650mA @5Vmax
Environmental:
Operating Temperature: oto+70c
Storage Temperature: -25 to +85 C
Humidity: 0 to 95%, non-condensing
Dimensions:
KPC-TM: 4.25in H x 5.0 in. W (half-slot)
KPC488.2TM: 4.25in. H x 13.25in. W (ii.ilI slot)
Software:
Call Driver Languages: BASICTM, QuickBASIC, C, Turbol'ascalsr',
VisualBASIC for DOS.
Trigger Master DLL: Operation with Windows 3.x languages.Includes
VisualBASIC, Borland C++, C for Windows, and
TurboPascal.
1 - 4 Trlgger Master INTERFACES USER GUIDE
1.4 Trigger-Link
Trigger Master supports Trigger-Liim, which brings a new dimension of flexibility,
accuracy,and throughput to test and instrumentation systems.This section introduces
the features of Trigger-Link
You can easily changethe trigger paths between instruments using Trigger-Link with
GPIB commands. The precise trigger signals on Trigger-Link enhancethe accuracy and
throughput of the system. Even systems which contain lnsbuments without Trlgger-
Link can benefit by using the 8502Trigger-Link Adapter. The 8502Trigger-Link Adapter
is the interface to Trigger-Link for conventional BNC trigger connections.Figure l-2
illustrates various Trigger-Link configurations.
Mechanically, Trigger-Link consistsof a cable with six signal paths and two grounds
which can be permanently daisy-chained between a group of instruments. The signal
paths convey trigger signals between instruments. With GPIB commands, instruments
can be configured to use one or more of the signal paths in a variety of modes.Thus the
trigger configuration of a group of instruments can be easily altered by software to suit
the requirements of a particular test.
ElectricalIy, Trigger-Link provides paths for trigger pulses between instruments, thus
eliminating the late&es involved with coordinating trigger functions with the GPIB
interface. This greatly increasessystem throughput and measurement preciseness all for
instrument systems.Instruments, which completely embrace the Trigger-Link standard,
employ a fast-track link between the trigger input and function execution and between
function conclusion and acknowledge output. Today, many instruments service the
trigger/acknowledge connectorsperiodically using a microprocessor that performs
other functions. However, this procedure results in unknown and variable timing
latencles as well as slower response.
Trigger-Link supports three trigger modes:
SYNC MODE A source sendsa trigger pulse or sequenceof pulses to synchronize
the activities of one or more receivers.There is no acknowledgement
from the receiver(s)that they have received a pulse and are
responding properly to the trigger(s).
ASYNC MODE The conventional two-wire handshake protocol where triggers are
sent on one line and the receiver acknowledges on a secondline.
Conceivably, multiple instruments could share a common trigger
source,but each instrument would require a separate
acknowledgement line.
SEMI-SYNC An innovative extension of the async mode which allows a single
trigger sourceand multiple receivers to carry out a handshake on a
single line. The trigger source will pulse the trigger line to an active
state for about 5 us. Upon receipt of the bigger all receiverswlIl hold
the trigger line in the active state before the trigger source goes
inactive. Eachindividual receiver will continue to hold the line active
until that receiver is ready to acknowledge it has completed its task.
When the line goesinactive the trigger source will know that all
receivers have completed their tasks.
INTRODUCTION `I - 5
Figure l-2 Trigger-Link Configuration Examples
I- 6 Trigger Master INTERFACES USER GUIDE
Chapter 2
INSTALLING Trigger Master
2.1 INTFlODUCTlON
The installation of Trigger Master includes the following:
. inspecting the KPC-TM and KPC488.2TMboards.
. setting jumpers and switches on the KPC-TM and KPC488.2TMboards.
. inserting the two boards into your PC.
. attaching all cablesto the boards.
. running the PLAYDOS.EXEand PLAYWINEXE programs to exerciseand verify
proper operation of the boards.
2.2 INSPECTING THE BOARDS
Remove eachboard from their protective packaging by grasping the metal rear panel
and removing the board from the anti-static bubble package.
Note: You should handle the boards only by their edges.A static electric
discharge can damage the integrated circuits on the boards.
INSTALLING Trigger Master 2-1
2.3 SETTING UP THE KPC-TM BOARD
The KPC-TM board is a stand-alone system trigger controller which requires four byte-
wide I/O addresses.The board contains a switch to set up the baseaddress in
increments of four bytes. This switch decodesaddresslines A9 to A2. The KPC-TM
board ships with a default setting of 3lO(hexadecimal)as shown in Figure 2-l. The
position OFF corresponds to a logical 1 and the position ON to a logical 0. Table 2-1 lists
the baseaddresseswith the appropriate switch settings for each address.
Figure 2-l KPC-TM Card Jumper and Switch Locations.
You can configure the KPC-TM board to generate interrupts on levels 2 through 7 by
changing the jumper on jumper block J2.Trigger Master ships with the interrupts
disabled as shown in Figure 2-1.
Note: The KPC-TM BaseAddress switch settings are position values only. Refer to
Table 2-1 for the corresponding Address Line values.
Address Switch
Decimal Hexadecimal &&e m
512 200 9 1
256 100 a 2
128 80 7 3
64 40 6 4
32 20 5 5
16 10 4 6
a a 3 7
4 4 2 a
Table 2-l Base Address Switch Setdngs
2 - 2 Trigger Master INTERFACES USER GUIDE
2.4 SElllNG UP THE KPC488.2Thl BOARD
The KPC488.2TMboard implements the trigger master control function and GPIB
control function on the sameboard. Both the trigger master and GPIEifunctions can
generateinterrupts. This manual describesthe settings for the interrupt Jumpersand the
switch and jumper settings for the GPIB function. Refer to the accompanying user
manual, IEEE 488 InterfaceBoards, further information. Figure 2-2 shows the locations
for
of the jumpers and switches on the KPC488.2Th4 card.
2-2 KPC-488.2TIMCard Jumper and Switch Locations
To prevent the same level from being used by both functions, use the interrupt three-
row jumper blocks to selectthe interrupt.
Use Jumper blocks J5and J3,shown in Figures
3-2 and 3-3, to set the interrupts levels for the
GPIB and Trigger Master. The top and middle
rows of the jumper blocks set the GPIB
interrupt level, and the bottom and middle
rows set the Trigger Master level.
. Placing a lumper vertically on the upper
and middle rows enablesan interrupt level
for the GPIB. Placing a jumper vertically on
the middle and bottom rows enablesan
F3gurfs Jumper Blocks J5 and J
29
interrupt level for Trigger Master.
r%ampfe
. Placing the GPIB jumper horizontally on
the upper row disables the GPIB interrupt and placing the trigger master jumper
horizontally on the bottom row disables the bigger master interrupt.
Figure 2-3 illustrates enabling interrupt level 12 for the GPIB and enabling interrupt
level 15 for Trigger Master (note that level 13 is unavailable on the PC/AT bus).
INSTALLING Trigger Master 2 - 3
Trigger Master requires four byte-wide addresses; switch SW3 to set the base
use
address in increments of 4. The switch decodesaddresslines A9 through A2. The
position OFF corresponds to a logical 1 and the position ON to a logical 0. The boards
ship with a default setting of 3lO(hexadecimal)as shown in Figure 2-2.
2.5 INSTALLING Trigger Master
Follow this procedure to install Trigger Master into your PC.
1. Turn the PC power switch to OFF. Unplug the power cord and disconnect all cables
from the rear of the system unit.
2. Remove the cover mounting screws from the rear of the system unit.
3. Slide the system unit cover forward. When the cover can go no further, tilt it up and
remove it from the base.
Note: Install the KPC488.2TM board into a 16-bit slot; the KPC-TM board can
use an S-bit slot.
4. Remove the rear panel cover screw from one of the computers add-on slots.
5. Pressthe board firmly into the main board expansion slot.
6. SeatTrigger Master cable in the Micro-DIN connectorand align the board before
tightening the rear panel mounting screw.
7. Securethe board with the rear panel mounting screw.
8. Align the rear cover, sliding it back into place. Reinstall the mounting screws.
9. Turn on the PC.
10. Make a backup of all application diskettes before copying the applications to your
PC's hard disk.
11. Run the PLAYDOSEXE and PLAYWIN.EXE programs to exercisethe boards.
Sincethe Trigger Master cable should seatcompletely in the MICRO DIN connector, you
may want to insert the cable and test the alignment of the card before tightening the
screw holding the bracket.
2.6 RUNNING PLAYDOSEXE or PLAYYVINEXE
Check the hardware and exerciseTrigger Master after installation by running either the
PLAYDOSEXE or PLAYWIN.EXE program. PLAYDOSEXE runs from the DOS
environment and PLAYWIN.EXE executesin the Windows environment.
PLAYDOSEXE and PLAYWIN.EXE provide a menu interface to the standard Trigger
Master driver calls without requiring the use of a programming language. You can also
use theseprograms to create and document Trigger Master programs.
2 - 4 Trigger Master INTERFACES USER GUIDE
The driver supports the following calls, which are described in detail in Chapter 3:
STCCMD SendsTrigger Master commands to the active Trigger Master
either for immediate execution or storage in Trigger Master
program memory.
STCDUMP Savesthe contents of the active Trigger Master program memory
to a binary file.
STCINIT Checks for the presenceof a Trigger Master. If Trigger Master is
found, it is initialized and made active. The driver can
simultaneously control up to four boards in the same computer.
STCLOAD Loads the contents of a binary file into Trigger Master program
memory.
STCSET Selectsa different Trigger Master to becomeactive (this Trigger
Master must have been initialized).
STCSTAT Requestsstatus information from the active Trigger Master.
The PLAYDOSEXE and PLAYWIN.EXE programs operate by listing these calls in a
main menu. When you select a call from the main menu, a form appropriate to that call
appears.Windows or buttons are provided, where necessary,for entering data or
making selectionsspecific to that call. After l3ling in any blanks on the form, press the
button for the call to start execution. Any error messages retumed from the driver are
displayed.
Eachform contains a "Help" button that provides assistanceon that form. Context-
sensitive help is also available. To enable context-sensitivehelp, you must first include
the files PLAYWIN.HLP or PLAYDOSHLP in the samedirectory as the executible files
PLAYWIN.EXE or PLAYDOSEXE. Accesshelp by pressing cFl> in PLAYWIN.EXE or
Shift+ WOWRRORCALL 9!awN Brrorzxit(rerr~
Calilng STCCMD from TurboPascal and TurboPascal for Wlndows
In TurboPascaland TurboPascal for Windows you must also declare unsigned variables
to receive information from the driver. However, the COmmand string sent to the driver
can be inserted directly in the call.
STCTPUB is a special interface to TurboPascal that acceptsa standard TurboPascal
string. STCLIBDLL is a general DLL that expectsso-called "c" strings. To send strings to
the DLL in TurboPascalfor Windows, createa string with a NULL character on the end
outside the call, and pass the "second element" of the string in the call.
3 - 12 Trigger Master INTSRFACES USER GUIDE
The Command Set
The command set consistsof ARM, BEGIN, CONT, DO, END, FLAG, HALT, LOOP,
TRIG, WAIT and X. The Trigger Master mode of operation determines how the
commands are operated on:
. In immediate mode, Trigger Master executescommands as they are received.The
commands BEGIN and CONT operate only in this mode.
. In program mode, the commands are stored in Trigger Master memory for future
execution. The commands DO, END, LOOP, and WAIT operate only in this mode.
. In run mode, Trigger Master is executing a program and will only recognize the
HALT command.
The remaining commands (ARM, FLAG, HALT, TRIG, and XI can be used in any mode
of operation.
The following sectionsdiscussthe commands in detail.
ARM
The Trigger Master trigger-detect logic latches trigger edges on the six trigger input lines
(the default is high-to-low transitions). The ARM command specifiesa trigger input
transition pattern to be detected.When the ARM command executesin a Trigger Master
stored program, the program waits until the pattern is detected before proceeding to the
next program step. In immediate mode, you can loop using the TRIG request
(previously described) to detect the pattern.
The ARM command must be followed by one or more line numbers. If you enter
multiple line numbers, separateeachnumber using commas. Specifying the sameline
number more than oncehas no effect and is not flagged as an error. The following
example waits for high-to-low trigger transitions on lines 1 and 5.
-.si
You can specify the edge to latch by using a + (low-to-high) or - (high-to-low, the
default) behind the line number. The following example waits for a low-to-high
transition on line 1 and high-to-low transitions on lines 3 and 5.
ann I.+, a-, 5;
Note: Becauseof the latching nature of the detect circuit, the edges need not
occur simultaneously and the state of the trigger lines wlll generally
differ from the pattern specified in ARM when the trigger condition is
met.
In program mode, ARM supports the REP extension which allows you to wait for the
trigger pattern to be repeated from 1 to 4096times before proceeding. The following
command line will wait for 23 repetitions of a trigger pattern of high-to-low transitions
on lines 1 and 4. Each time the pattern is detected, latches are automatically cleared and
rearmed.
USING THE Trigger Master DRIVER 3 - 13
The general syntax for the ABM command is:
ARM flI+l-l 1....)[:Fsz nn1:
The variable r mustbe within the range1 through6 andthe variableIYL
mustbe in the range1
through4096.
BEGIN
Use BEGIN only in immediate mode to switch Trigger Master to program mode. The
BEGIN command optionally acceptsa single argumenb the Trigger Master program
memory address where the program will start loading. This integer argument must be
in the range 0 through 1023(the default starting address, with no argument, is 0). The
following example switches the driver to program mode and initializes the program
counter to 40.
begin 40;
The general syntax for the BEGIN command is:
The variable = mustbe in the range0 through1023.
Normally, you will startprogramloadingandexecutionat address but you may alsohave
0,
multiple programsin memory(terminate eachprogramwith an END or HALT command).
To load or execute
multiple programs, mustknow the locationsof the instructions.
you
Determinetheselocationseitherby building a programfrom PLAYWNEXE or
PLAYDOSJXE or by using the techniques described in Chapter 5, Creating Programs
for
Trigger MasterMemory.
CONT
Use CONT in immediate mode to restart a program that was stopped by a HALT
command or FLAG[m]:INT command within the program. You cannot reliably restart a
program that has been halted externally (from outside the program). If the program
contains additional FLAG[nn]:INT commands, use the CONT command with the INT
extension to clear the previous interrupt and arm Trigger Master to generateanother
interrupt. The following example restarts a program without interrupts:
This example restarts a program executing out of Trigger Master memory. The general
syntax for the CONT command is:
ccmz Ir1NTl;
Note: If you enableTrigger Masterto generate
interrupts,you must supplyyour own interrupt
servicemutlnes.
3 - 14 Trigger Master INTERFACES USER GUIDE
DO
Use DO in program mode to mark the start of a sequenceof code which is to be
repeated. The DO command requires a single argument, which is an integer in the range
of 1 through 4096.The argument specifiesthe number of times the code sequenceis to
repeat. The code sequencemust be terminated by the LOOP command (described later
in this section).The driver allows two levels of loops; the driver will flag an error if you
attempt to start a third level. In the following example, first command1 executes,then
command2; this code sequencerepeats25 times:
de 25; cemmand1; c-i loop;
The general DO syntax is:
Donni
nn is in the range 1 through 4096
END
Use END in program mode to insert a HALT (described later in this section) and return
Trigger Master to immediate mode. The driver wIII return an error if you attempt to end
a program that has DO commands which ha
◦ Jabse Service Manual Search 2024 ◦ Jabse Pravopis ◦ onTap.bg ◦ Other service manual resources online : Fixya ◦ eServiceinfo