Pepper Computer RS232, RS485 user manual SMDAC1OpenLoop Syntax, Input

Models: RS485 RS232

1 320
Download 320 pages 36.43 Kb
Page 271
Image 271

Chapter 5 Analog Modules

SMART I/O User’s Manual

 

 

 

 

 

 

 

 

 

 

5.5.8.3 SMDAC1OpenLoop

Syntax

error_code SMDAC1OpenLoop(u_int8 PortNr, u_int8 pStatus);

Description

This function should only be used for the current version of the SM-DAC1 module and checks the wires for open loop in a 4..20mA environment. The result is stored in a register with the following definition.

Register value: 111110 -> channel 0 connected and o.k

101111 -> channel 4 connected and o.k

Input

SM-Port to be accessed

u_int8 PortNr

u_int8 pStatus

Pointer to the location where the status is

 

stored:

0

-> line connected and o.k

Output

 

1

-> line below 4mA

 

 

 

5

error_code

Example

SUCCESS

if module was not initialised

E_SEEK

E-BMODE

if the module is unknown

or standard OS-9 error code (refer to the OS-9 Technical Manual Error Codes Section).

RetVal = SDAC1OpenLoop(0, &Status);

Note

If this function is called and requested for use with a voltage version of the SM-DAC1 module then an error will be returned. Likewise, if a channel is requested that is out of range then an error is returned.

 

 

 

 

October 01, 1996

©1996 PEP Modular Computers GmbH

Page 5 - 115

 

 

Page 271
Image 271
Pepper Computer RS232, RS485 user manual SMDAC1OpenLoop Syntax, Input