Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Nov 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Language Interface: 16-bit Turbo Pascal for Windows

4 ratings | 2.00 out of 5
Print

Downloads

Filename: example900159.zip
Requirements: View

This is the GPIB language interface for Turbo Pascal for Windows, a Windows 3.x programming environment for creating 16-bit applications. Download the Turbopas.zip file (in the example.zip file, below). This file contains the declaration file TPWGPIB.TPU (which is also the language interface file), TPWGPIB.PAS (the Turbo Pascal for Windows source code for TPWGPIB.TPU), and some sample programs.


How to Use the 16-bit Turbo Pascal for Windows Language Interface:

I. Overview

The 16-bit GPIB language interface for Turbo Pascal contains the following files:

TPWGPIB.TPU: Win16 unit containing constant declaration and initialization, function and procedure prototypes, and direct entry points to the GPIB driver (GPIB.DLL)
TPWGPIB.PAS: Turbo Pascal for Windows source code for TPWGPIB.TPU


II. Items to Include in Your GPIB Application

You must include the following line at the beginning of your application:

Uses TPWGPIB;


III. Formal Parameters for Board, Device, and File Names

The formal parameters for board or device names and filenames are of type PChar. Therefore, the corresponding actual parameters must be of type PChar as illustrated below:

var flname,devname : PChar;
dvm : Integer;
devname := 'DVM';
dvm := ibfind(devname); (* or dvm := ibfind('DVM'); *)
flname := 'B:DGS';
ibwrtf(dvm, flname); (* or ibwrtf(dvm, 'B:DGS'); *)

Because formal parameters for command, read, and write buffers are untyped, Turbo Pascal variables of a user-specified array type or of type cbuf are compatible with the Turbo Pascal language interface. Turbo Pascal applications that use parameter types nbuf and flbuf must be changed to use the Turbo Pascal predefined array type PChar.


IV. Protected Mode Issue

The Turbo Pascal for Windows language interface cannot be used for protected-mode applications.

Requirements


Filename: example900159.zip

Software Requirements


Language(s): Pascal

Hardware Requirements


Hardware Group: GPIB
Driver: NI-488.2

 
4 ratings | 2.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).