CONTROL OF MED INPUT/OUTPUT MODULES FROM OTHER LANGUAGES



Similar documents
SOF-710 ANIMAL FOOD INTAKE MONITOR

STANDALONE PCI INTERFACE PACKAGE

USB CASH DRAWER INTERFACE. Introduction

AVERSIVE STIMULATION WITH VIDEO MONITORING

EcgSoft. Software Developer s Guide to RestEcg. Innovative ECG Software info@ecg-soft.com

Visual Basic Programming. An Introduction

CANnes PC CAN Interface Manual

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may

Hands-On Lab. Client Workflow. Lab version: Last updated: 2/23/2011

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

STIM202 Evaluation Kit

Introduction to the DLL for the USB Experiment Interface Board K8055

TekBots TM Oregon State University. usb_cam User Guide. Version 1.0 By Adriaan Smit OSU EE Graduate Student

Resource Checking. Windows 95/98/NT Resource Checking Manual for PCI/ISA DAQ card. [For Windows 95/98/NT]

CSI Software Development Kit Beginner s Guide Revision: 8/06

UniFinger Engine SDK Manual (sample) Version 3.0.0

Programming the VEX Robot

The Answer to the 14 Most Frequently Asked Modbus Questions

Eclipse installation, configuration and operation

DALI Driver Configurator User Guide

Status Monitoring. Using Drivers by Seagull to Display Printer Status Information WHITE PAPER

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

APPLICATION NOTE 1740 White Paper 6: 1-Wire Drivers Installation Guide for Windows

APPLICATION PROGRAMMING INTERFACE

SkyRecon Cryptographic Module (SCM)

APCI-8001, APCI-8008 and CPCI-8004

USB I/O CONTROL BOX 8 relays, 8 digital I/O lines and 8 HV inputs

Athena Knowledge Base

A Microsoft Access Based System, Using SAS as a Background Number Cruncher David Kiasi, Applications Alternatives, Upper Marlboro, MD

Basic Use of the SPC Feature on 1100R+/H+ Testers

SecureDoc Disk Encryption Cryptographic Engine

Star USB Vendor Class Driver Installation Manual

E-Blocks Easy RFID Bundle

AN3998 Application note

DE4 NetFPGA Packet Generator Design User Guide

Gigabit Ethernet Packet Capture. User s Guide

PN L, Revision B, October Epic 950 TM. Master Programmer User s Guide

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Call Center - Purchased Solution 64 Bit Installation Instructions

M230 WIN App E 2.3.0

EWF Management Software Windows driver software for Classembly Devices /Industrial Controller

iscan USB User manual UNIFIED FIELD COMMUNICATION

1-Port R422/485 Serial PCIe Card

1 Minimum system requirements

B&K Precision 1785B, 1786B, 1787B, 1788 Power supply Python Library

XPort Universal Demo Board User Guide

Using WinUSB in a Visual Studio Project with Freescale USB device controller

DALI Driver Configurator User Guide Tool for advanced LED driver parameter setting and ic configuration.

Introduction: Implementation of the MVI56-MCM module for modbus communications:

2S RS232 Multi Serial PCI Card Installation Guide

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

RN-XV-RD2 Evaluation Board

(Cat. No SI) Product Data

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

Freescale MQX USB Device User Guide

INDEX. Trademarks All name and product s trademarks mentioned below are the property of their respective companies.

SMAC SM Status Monitoring and Control Quality of Service (QoS) Diplex Switch Test Gear. Installation & Operation Manual

ISIS Application Program Interface ISIS_DLL User s Manual. Preliminary Version

Windows CE 6.0 APEX ZF

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

FTP Client Engine Library for Visual dbase. Programmer's Manual

Connection and Configuration of Baudisch SIP unit with Display and RFID Reader Module

GPS NTP Time Server for Intranet Networks DIN RAIL Version

PIO-32.PCI User Manual

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

Modbus Communications for PanelView Terminals

1 Introduction Installation on Windows 7, 64 Bits New Central Command Engine and Firmware Update... 4

SenseLink TM. End-Point Controller. Addendum

UM0586 User manual. STM32 Cryptographic Library. Introduction

Master-Touch and ValuMass. Modbus Communications. INSTRUCTION MANUAL (Rev. 2.1)

Orbit PCI Mk 2 Network Card. User Manual. Part No Issue 4

CITIZEN OPOS DRIVER 1.8 Setup Guide. 10/03/29 Rev 1.09

Context-sensitive Help Guide

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

TRENDnet. <a trendnet.com"> Quick Installation Guide. Product Warranty Registration

Serial Ports Troubleshooting. Rev

Back Office Recorder Dig04 Installation Guide

AN10811 Programming SPI flash on EA3131 boards Rev May 2009 Application note Document information Info Content Keywords Abstract

WinCC. Communication Manual. Manual 2. This manual is part of the documentation package with the order number: 6AV6392-1CA05-0AB0 C79000-G8276-C156-01

The RT module VT6000 (VT6050 / VT6010) can be used to enhance the RT. performance of CANoe by distributing the real-time part of CANoe to a

SMTP-32 Library. Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows. Version 5.2

USB-MIDI Setup Guide. Operating requirements

Debugging Windows Applications with IDA WinDbg Plugin Copyright 2011 Hex-Rays SA

Single channel data transceiver module WIZ2-434

如 何 在 C#.2005 中 使 用 ICPDAS I/O Card 的 DLL 檔 案

RTI Integration Release Notes

Installing the Gerber P2C Plotter USB Driver

BECKHOFF. Application Notes. BC9000: Getting Started Guide. For additional documentation, please visit.

DATENBLATT USB-DIO32HS USB-DIO32HS-OEM. HABEN SIE FRAGEN ODER WÜNSCHEN SIE EIN INDIVIDUELLES ANGEBOT? Unser Team berät Sie gerne persönlich.

Document Digital Signature

User Manual. 3-Heights PDF Producer API. Version 4.6

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

S7 for Windows S7-300/400

PnP Driver Installation

Windows Audio Drivers Guide

Quick Start Guide GigE Vision Single-Head Controller

SATA 150 RAID. user. Model MAN UM

2-Port RS232/422/485 Combo Serial PCI Card

Transcription:

CONTROL OF MED INPUT/OUTPUT MODULES FROM OTHER LANGUAGES USERS MANUAL SOF-732-3 Users Manual DOC-149 Rev. 1.1 Copyright 2007 All Rights Reserved MED Associates Inc. P.O. Box 319 St. Albans, Vermont 05478 www.med-associates.com

- 2 -

DIG-704 INPUTS AND OUTPUTS The DIG-704 driver controls when and how the outputs are turned on and when the inputs are read. The Dynamically Linked Library (DLL) 704IO.DLL provides the user with the ability to talk to the DIG-704 driver. There are two functions contained in the 704IO.DLL that the user can call from within their program, PortRead and PortWrite. The 704IO.DLL needs to be placed in the appropriate folder so that the calling program can find it when necessary. The correct folder is operating system dependent: Windows 98 Windows 2000 Windows XP C:\Windows\System C:\WINNT\System32 C:\Windows\System32 For Visual Basic 6.0 users the module 704IO.bas is provided. Also an example project is provided demonstrating how to use the functions. For Delphi users the header file 704IO.hed is provided. For C++ users the header file 704IO.h and library 704IO.lib is provided. Each of the above files contains the PortRead and PortWrite function declarations, which need to be included with the desired program. Figure 1 Sample Program - 3 -

PORTREAD Visual Basic Declaration Declare Function PortRead Lib "704IO.dll" (ByVal Rack As Integer, ByVal Port As Integer, ByVal Offset As Integer) As Integer Delphi Declaration Function PortRead(Rack, Port, Offset : Integer) : Integer; stdcall; external '704IO.dll' name 'PortRead'; C++ Declaration extern "C" short WINAPI EXPORT PortRead(short Rack, short Port, short Offset); The PortRead function returns the value read from the specified Rack, Port, and Offset. It contains the following parameters: Rack: Valid values 1 4 This is the Rack number that the input card is installed in. It is possible to have up to four DIG-704 PCI cards in the computer, and each DIG-704 PCI card is connected to its own Rack via a ribbon cable. Use MED Test to determine the appropriate Rack number for the input card. In most cases it will be 1. If MED Test does not provide the option of changing the Rack number, then it is Rack 1. Port: Valid values 780 795 This is the Port number of the input card that needs to be read. The Port number for the input card is set using either a jumper or switch on the card itself. SmartCtrl TM and Standard Input cards by default start at Port 780 and increment by one for each additional card. For example, the first SmartCtrl card would have an input Port of 780, the second SmartCtrl card would have an input Port of 781, etc. SuperPort Input cards use a default Port value of 789. While it is possible to change the input Port on a SuperPort card it is recommended that it be left at the default value. Offset: Valid values -1 254 This is the Offset number of the input card that needs to be read. On some cards (i.e. SuperPort Input cards) the Offset number is set by a jumper on the card itself. SmartCtrl and Standard Input cards use an Offset value of -1. This value is hard coded and cannot be changed. SuperPort Input cards by default start at Offset 0 and increment by 2 for each input card. Also each SuperPort Input card has two Offset values per card. This means that there are two input Bytes that can be read on every SuperPort Input card. For example the first SuperPort Input card would have an Offset value of 0-4 -

for the first Byte and 1 for the second Byte. The second SuperPort Input card would have an Offset value of 2 for the first Byte and 3 for the second Byte, etc. Return Value: The return value from the PortRead function is an Integer. A value of 0 means that all inputs were off and a value of 255 means that all inputs were on. The number indicates which inputs or Bits were on at the time the value was read: Input # Bit # 1 1 2 2 3 4 4 8 5 16 6 32 7 64 8 128 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255 If more than one input is on at the time of the reading, then the values will be added together to come up with the resulting number. Example: 133 = 1 + 4 + 128 and means that inputs 1, 3, and 8 were on at the time of the reading. Example: Value = PortRead(1, 780, -1) Read the value from Rack 1, Port 780, Offset -1. (Note: The Rack, Port, and Offset values are the default values for the first SmartCtrl or Standard Input card.) - 5 -

PORTWRITE Visual Basic Declaration Declare Sub PortWrite Lib "704IO.dll" (ByVal Rack As Integer, ByVal Port As Integer, ByVal Offset As Integer, ByVal Value As Integer) Delphi Declaration Procedure PortWrite(Rack, Port, Offset, Value : Integer); stdcall; external '704IO.dll' name 'PortWrite'; C++ Declaration extern "C" void WINAPI EXPORT PortWrite(short Rack, short Port, short Offset, short Value); The PortWrite function writes the Value specified to the Rack, Port, and Offset provided. It contains the following parameters: Rack: Valid values 1 4 This is the Rack number that the output card is installed in. It is possible to have up to 4 DIG-704 PCI cards inside the computer. Each DIG-704 PCI card is connected to its own Rack via a ribbon cable. Use MED Test to determine the appropriate Rack number for the output card. In most cases it will be 1. If MED Test does not provide the option of changing the Rack number, then it is Rack 1. Port: Valid values 780 795 This is the Port number of the output card that needs to be written to. On some cards (i.e. SuperPort and Standard Output cards) the Port number is set using a jumper on the card itself. Standard Output cards by default start at Port 780 and increment by one for each additional card. For example the first Standard Output card would have an output Port of 780, the second Standard Output card would have an output Port of 781, etc. SmartCtrl cards use an output Port value of 792. This value is hard coded and cannot be changed. SuperPort Output cards use a default Port value of 792. While it is possible to change the output Port on a SuperPort Output card it is recommended that it be left at the default value. Offset: Valid values -1 254 This is the Offset number of the output card that needs to be written to. On some cards (i.e. SmartCtrl and SuperPort Output cards) the Offset number is set by a jumper or red switch on the card itself. Standard Input cards use an Offset value of -1. This value is hard coded and cannot be changed. - 6 -

There are four types of SmartCtrl cards (DIG-715, DIG-716, DIG-715A, and DIG- 716B), however all of the cards work the same way when writing to them. By default SmartCtrl cards start at Offset 0 and increment by 2 for each card. Two of the SmartCtrl cards (DIG-715 and DIG-716) only have one output Byte that can be written to. In this case the even Offset number is always used to address the card. For example the first SmartCtrl card would have an Offset value of 0, the second SmartCtrl card would have an Offset value of 2, etc. Two of the SmartCtrl cards (DIG-715A and DIG-716B) have two output Bytes that can be written to. In this case two Offset numbers are used to address the desired Byte. For example the first SmartCtrl card would have an Offset value of 0 for the first Byte and1 for the second Byte. The second SmartCtrl card would have an Offset value of 2 for the first Byte and 3 for the second Byte, etc. SuperPort Output cards by default start at Offset 0 and increment by 2 for each output card. Also each SuperPort Output card has two Offset values per card. This means that there are two output Bytes that can be written to on every SuperPort Output card. For example the first SuperPort Output card would have an Offset value of 0 for the first Byte and 1 for the second Byte. The second SuperPort Output card would have an Offset value of 2 for the first Byte and 3 for the second Byte, etc. Value: Valid values 0 255 This is the Value that is to be sent to the specified Rack, Port, and Offset. A Value of 0 would turn off all outputs and a Value of 255 would turn on all outputs. There are eight outputs available at each Port/Offset. To turn on an output you have to specify which Bit in the Byte to turn on: Output # Bit # 1 1 2 2 3 4 4 8 5 16 6 32 7 64 8 128 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 = 255-7 -

To turn on multiple outputs with one command just add the Bit values together and send that as the Value. Example: 2 + 16 + 64 = 82 and would result in outputs 2, 5, and 7 being turned on. Example: PortWrite(1, 792, 0, 10) Write the Value 10 to Rack 1, Port 792, Offset 0. This will result in outputs 2 and 4 being turned on. (Note: The Rack, Port, and Offset values are the default values for the first SmartCtrl or SuperPort Output card.) - 8 -