Crbasic; Sdmao4A() Instruction - Campbell SDM-AO4A Product Manual

Four-channel analogue output module
Hide thumbs Also See for SDM-AO4A:
Table of Contents

Advertisement

7.1

CRBasic

7.1.1 SDMAO4A() Instruction

NOTE
The SDMAO4A() instruction is used to set the voltage to an SDM-AO4A.
The SDM-AO4A is backwards compatible with the SDMAO4()
CRBasic instruction. Therefore, programs written using the
SDMAO4() instruction will work with an SDM-AO4A but will
not take advantage of any of the SDM-AO4A's additional
features. If the older instruction is used, the device will use the
default option code 1.
The SDMAO4A() instruction has the following syntax:
SDMAO4A
(Source, SDMAO4ADest, SDMAddress, SDMAO4AStartChan,
Reps, SDMAO4AOption )
The SDMAO4A() instruction has the following parameters:
Source: The Source parameter is the variable or variable array that holds the
voltage(s), in millivolts, that will be sent to the SDM-AO4A(s). If multiple
SDM-AO4As are to be triggered with one instruction, this parameter must be
dimensioned to the total number of channels for all the devices being set (e.g.,
if all four channels are being set on two SDM-AO4 devices, Source must be
dimensioned to eight).
SDMAO4ADest: The SDMAO4ADest parameter is a variable that holds a
status code indicating success or failure of the instruction.
Response Code Description
240
Successful
241
Signature error
242
Current overload error
243
Current overload and signature error
A current overload error occurs when current overload protection is triggered
(130 mA, +/- 15 mA). A signature error usually indicates noise on the line.
Any other response code returned indicates failed communication.
SDMAddress: The SDMAddress parameter defines the address of the first
SDM-AO4A to which a voltage should be applied. Valid SDM addresses are 0
through 14. Address 15 is reserved for the SDMTrigger() instruction.
SDMAO4AStartChan: The SDMAO4StartChan parameter is used to define the
first channel on the SDMAO4A that should be set. Any reps will occur on
subsequent channels.
Reps: The Reps parameter determines the number of SDM-AO4A output
channels that will be set. If this parameter is greater than four (i.e., voltage is
being set for more than one SDM-AO4 device), voltage is set on the next
consecutively addressed SDM-AO4A device. In this case, the SDM-AO4As
must have sequential SDM addresses.
SDM-AO4A Four-Channel Analogue Output
7

Advertisement

Table of Contents
loading

Table of Contents