DIAdem API Reference

Command: ChnConvertNumericToAssignment

  • Updated2023-02-21
  • 3 minute(s) read

Display all  Hide all

Valid names: ChnConvertNumericToAssignment, ChnToAssignmentChn

Generates one assignment channel from two channels. Both channels must be the same length greater zero.

Set ChnResult = ChnConvertNumericToAssignment(Y, Y1, DefaultValue, [DeleteAssignments])

Input Parameters

Y Specifies the data channel containing the numeric values. The channel must be a numeric channel, a waveform channel, or an assignment channel.
If the first channel is an assignment channel, the existing assignment parameters are replaced with the assignment values of the second channel.
Y1 Specifies the data channel containing the text assignment values. The channel can be a text channel, an enumeration channel (Bus-Log-Converter), or an assignment channel.
If the channel Y1 is an Assignment channel, DIAdem transfers the Assignment channel parameters unchanged to the new assignment channel.
If channel Y1 is an enumeration channel, DIAdem generates the assignment channel parameters from the channel properties CANEnumSubst and EnumValues. Both properties must have the same number of elements for this. If the enumeration channel only contains the property EnumValues, DIAdem generates the assignments from the values of the enumeration channel and the custom properties. Therefore the enumeration channel must not contain NoValues.
If the channel Y1 is a Text channel, DIAdem generates the assignments from the values of the numeric channel and from the texts of the text channel. Therefore the numeric channel must not contain NoValues.
If you do not specify the channel Y1, DIAdem assigns an assignment channel containing the value of DefaultValue. You can edit assignments in the dialog box Assignment Parameters or with a script using the property AssignmentList.
If you do not specify the channel Y1, DIAdem ignores the parameter DeleteAssignments.
DefaultValue Specifies the text which DIAdem uses in assignment channels when no text is assigned to the value.
[DeleteAssignments] Specifies that DIAdem deletes the assignments for the AssignmentChnToNumericChn command and replaces the numeric channel with the assignment channel for the ChnToAssignmentChn command and also that DIAdem deletes the channel from where the assignment texts originate. The default value of the variable is FALSE.

Return Parameters

ChnResult Contains the result channel or result channels. ElementList <Data> type return value.
If you want to use waveform channels in this command, follow Rule 2.3 for Calculating with Waveform Channels.

Dialog Box Call

Call SUDDlgShow("Main", ResourceDrv & "AnaChnAssignment")

Numeric Channels <-> Assignment Channels

Related Topics

Command: ChnConvertAssignmentToNumeric | Command: ChnConvertAssignmentToText | Command: ChnConvertCartesianToPolar | Command: ChnConvertNumericToTime | Command: ChnConvertNumericToWaveform | Command: ChnConvertPolarToCartesian | Command: ChnConvertTextToAssignment | Command: ChnConvertTimeToNumeric | Command: ChnConvertWaveformToNumeric