Analog I/O. ADLINK Technology PCI-8136M

Add to My manuals
107 Pages

advertisement

Analog I/O. ADLINK Technology PCI-8136M | Manualzz

5.7 Analog I/O

@ Name

_8136_A_Write_Value - Output DAC in value

_8136_A_Write_Volt - Output DAC in voltage

_8136_A_Read_Value - Input from ADC in value

_8136_A_Read_Volt - Input from ADC in voltage

_8136_A_Output_Control - Start or stop DAC output

_8136_A_Set_Trigger - Set DAC output by trigger

_8136_A_Set_Trigger_Map - Select DAC trigger source

_8136_A_Set_Preload_Volt - Set DAC trigger output voltage

_8136_A_Set_Compare_Value - Set ADC compare value

_8136_A_Set_Compare_Volt - Set ADC compare voltage

@ Description

_8136_A_Write_Value

This function is for generating a DC value from DAC channel. The resolution of DA converter is 16-bits. The mapping value for 0 volt is 0x0000 , +10 volt is 0x7fff and –10 volt is 0x8000. There are six channels in one card. All channels are free to run individually.

_8136_A_Write_Volt

This function is for generating a DC value from DAC channel. The resolution of DA converter is 16-bits. User can assign a voltage value to this function directly. The range of voltage value is from –10.0 to +10.0. There are six channels in one card. All channels are free to run individually.

_8136_A_Read_Value

This function is for reading a digital value from ADC channel. The resolution of AD converter is 12-bits. User can read a word from this function. The mapping value for 0V is 2000, +10V is 4000 and –10V is 0. There are six channels in one card. All channels are free to run individually.

_8136_A_Read_Volt

This function is for reading a voltage value from ADC channel. The resolution of AD converter is 12-bits. User can read a voltage value from this function directly. The range of the read-back voltage value is for –10.0V to +10.0V. There are six channels in one card.

All channels are free to run individually.

74

• Motion Library

_8136_A_Output_Control

Once user wants to stop outputting any voltage from DA channel, he can use this f unction to close DA channel immediately. It can be open again by this function too.

_8136_A_Set_Trigger

This function is for enable/disable DA channel output by trigger source. The trigger source would be ADC comparator interrupt or encoder counter comparator interrupt.

_8136_A_Set_Trigger_Map

This function is for assigning each channel's trigger source. The trigger source is selected by one parameter. Each bit of this parameter represents one kind of trigger source. Bit0~5 means trigger source is from encoder counter channel 0~5 and bit8~13 means trigger source is from ADC channel 0~5. Set 1 is for enable and 0 is for disable.

_8136_A_Set_Preload_Volt

Once user set the DAC trigger function, the preload voltage must be set first. When the trigger is active, the DAC channel will output this preload value.

_8136_A_Set_Compare_Value

This function is for DAC trigger output or simply for generating

ADC comparator interrupt. When user wants to output a preload voltage which is triggered by ADC level, the trigger level must be set by this function. The trigger level is set by a 12-bits ADC value with a range from 0 to 4000.

_8136_A_Set_Compare_Volt

This function is for DAC trigger output or simply for generating

ADC comparator interrupt. When user wants to output a preload voltage which is triggered by ADC level, the trigger level must be set by this function. The trigger level is set by a 12-bits ADC voltage with a range from –10.0 to 10.0.

@ Syntax

C/C++ (DOS, Windows 95/98/NT/2000)

I16 _8136_A_Write_Value(I16 CardNo, I16 Channel, I16 Value)

I16 _8136_A_Write_Volt(I16 CardNo, I16 Channel, F64 Volt)

I16 _8136_A_Read_Value(I16 CardNo, I16 Channel, I16 *Value)

I16 _8136_A_Read_Volt(I16 CardNo, I16 Channel, F32 *Volt)

I16 _8136_A_Output_Control(I16 CardNo, I16 Channel, I16

Control)

I16 _8136_A_Set_Compare_Value(I16 CardNo, I16 Channel, I16

Value)

I16 _8136_A_Set_Compare_Volt(I16 CardNo, I16 Channel, F64

Volt)

Motion Libra

• 75

I16 _8136_A_Set_Trigger_Map(I16 CardNo, I16 Channel, I16

Source)

I16 _8136_A_Set_Trigger(I16 CardNo, I16 Channel, I16 Control)

I16 _8136_A_Set_Preload_Volt(I16 CardNo, I16 Channel, F64

Volt)

Visual Basic 5.0 or higher

B_8136_A_Write_Value (ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Value As Integer) As Integer

B_8136_A_Write_Volt (ByVal CardNo As Integer, ByVal Channel

As Integer, ByVal Volt As Single) As Integer

B_8136_A_Read_Value Lib (ByVal CardNo As Integer, ByVal

Channel As Integer, Value As Integer) As Integer

B_8136_A_Read_Volt (ByVal CardNo As Integer, ByVal Channel

As Integer, Volt As Double) As Integer

B_8136_A_Output_Control (ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Control As Integer) As Integer

B_8136_A_Set_Compare_Value(ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Value As Integer) As Integer

B_8136_A_Set_Compare_Volt (ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Volt As Double) As Integer

B_8136_A_Output_Control (ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Control As Integer) As Integer

B_8136_A_Set_Trigger_Map(ByVal CardNo As Integer,ByVal

Channel As Integer, ByVal Source As Integer) As Integer

B_8136_A_Set_Trigger(ByVal CardNo As Integer, ByVal Channel

As Integer, ByVal Control As Integer) As Integer

B_8136_A_Set_Preload_Volt(ByVal CardNo As Integer, ByVal

Channel As Integer, ByVal Volt As Double) As Integer

@ Argument

CardNo: card number designated to set (Range 0 ~ 3)

Channel: channel number designated to set (Range 0 ~ 6)

Value: the output value for DAC channel (Range –32768 ~

+32767)

Volt: the output voltage for DAC channel (Range –10.0 ~ +10.0)

Value: the input value for ADC channel (Range 0 ~4000)

Volt: the input voltage for ADC channel (Range –10.0 ~ +10.0)

Control: enable or disable trigger ( 1 for enable/0 for disable )

Source: Set DAC trigger source

Value 0~5 is for encoder 0~5

Value 8~13 is for ADC channel 0~5

@ Return Code

ERR_RangeError

ERR_NoError

76

• Motion Library

advertisement

Related manuals

advertisement

Table of contents