DataqFile Controls > WriteDataqFile > Methods > EUCal

Previous | Next

EUCal

Applies to:

WRITEDATAQFILE Active X Control

Description:

Use this to write the range of a certain channel in calibrated units to the data header. There are 3 parameters to be entered with this function:

The first parameter is the maximum value of the channel.

The second parameter is the minimum value of the channel.

The third parameter is the logical channel in the index on the channel list, not the physical channel. For example, if the channel list is 1, 5, 8, 9, 10, and you want to set the engineering units maximum and minimum values of channel 8, you would set the channel argument of EUCal to 2. If you want to set the engineering units maximum and minimum values of channel 1, you would set the channel argument of EUCal to 0.

See EUTag to specify engineering units.

Syntax:

WriteDataqFile1.EUCal(maximum,minimum,index) (where maximum is the maximum value of the channel, minimum is the minimum value of the channel, and index is the channel designation)

Variables:

Maximum and Minimum Values - Double, Index - Integer

Examples:

Dim ChannelList(32) As Integer

 

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

x = DataqSdk1. GetData

WriteDataqFile1. SaveData (x)

DQChart1. Chart (x)

DQChart2. Chart (x)

End Sub

 

Private Sub Form_Load()

ChannelList(0) = 0

ChannelList(1) = 31

DQChart1. Channel = 0

DQChart2. Channel = 1

End Sub

 

Private Sub Start_Click()

DataqSdk1. ADChannelCount = 2

DataqSdk1. EventPoint = 20

'This is the default. The range is +/-10 and the channel index is 0, so this range applies to the first enabled channel

WriteDataqFile1.EUCal 10, -10, 0

'The range is +/- 5 and is being applied to the second enabled channel

WriteDataqFile1.EUCal 5, -5, 1

WriteDataqFile1. EUTag "volt",0

WriteDataqFile1. EUTag "lbs.",1

WriteDataqFile1. FileName = "c:\temp\sample.wdq"

DataqSdk1. ADChannelList (ChannelList)

DataqSdk1. Start

WriteDataqFile1. Open

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

WriteDataqFile1. Close

End Sub

The above program would give you the following visual presentation in WinDaq Waveform Browser (WWB):

Generate/EUTag.jpg

 

Reference Materials | Top