DataqFile Controls > WriteDataqFile > Methods > EUTag

Previous | Next

EUTag

Applies to:

WRITEDATAQFILE Active X Control

Description:

Use this to write the engineering units of a channel to the data header. There are two parameters to define in this function:

The first parameter is the engineering units. This can be any string up to 4 characters.

The second 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 tag for channel 8, you would set the channel argument of EUTag to 2. If you want to set the engineering units tag for channel 1, you would set the channel argument of EUTag to 0.

By default, all channels use "VOLT" as the engineering units.

See EUCal to specify maximum and minimum values of a channel.

Syntax:

WriteDataqFile1.EUTag(unit,index) (where unit specifies the calibrated engineering units, and index is the channel designation - see ChannelList is SDK control)

Variable:

Unit - String, 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

WriteDataqFile1. EUCal 10, -10, 0

WriteDataqFile1. EUCal 5, -5, 1

'This is the default. The unit here would be volt, and the specified channel would be the first enabled channel

WriteDataqFile1.EUTag "volt",0

'The unit would be pounds and the specified channel would be the second channel

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