Class IOSignal
Represents an I/O signal in the Station or in a SmartComponent.
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("TIOSignalDef")]
public sealed class IOSignal
Constructors
IOSignal(String, IOSignalType)
Creates a new instance of the IOSignal class.
Declaration
public IOSignal(string name, IOSignalType type)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the signal. The name must be unique within the parent. |
IOSignalType | type | Type of the signal. |
Properties
AutoReset
Gets or sets if a digital signal should automatically be reset to zero.
Declaration
public bool AutoReset { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Description
Gets or sets a localized description for this signal.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The description is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English description unless LanguageOverride is set.
DisplayName
Gets or sets a localized name for this signal.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The name is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English name unless LanguageOverride is set.
Flags
Specifies additional attributes for this signal.
Declaration
public IOSignalFlags Flags { get; set; }
Property Value
Type | Description |
---|---|
IOSignalFlags |
GroupName
Gets or sets a localized group name for this signal. It can be used to group signals in a user interface.
Declaration
public string GroupName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The name is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English name unless LanguageOverride is set.
IsInput
Returns true if the signal is an input (digital, group or input).
Declaration
public bool IsInput { get; }
Property Value
Type | Description |
---|---|
Boolean |
MaxValue
Gets or sets the maximum value for an analog signal.
Declaration
public double MaxValue { get; set; }
Property Value
Type | Description |
---|---|
Double |
MinValue
Gets or sets the minimum value for an analog signal.
Declaration
public double MinValue { get; set; }
Property Value
Type | Description |
---|---|
Double |
Name
Gets the name of this signal.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Parent
Gets the ProjectObject that contains this signal. The object implements IHasIOSignals.
Declaration
public ProjectObject Parent { get; }
Property Value
Type | Description |
---|---|
ProjectObject |
ReadOnly
Indicates if the value of this signal shall be possible to modify in a user interface or not.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The value can always be set programatically or through a connection, even if ReadOnly is true.
SignalType
Gets the type of the signal.
Declaration
public IOSignalType SignalType { get; }
Property Value
Type | Description |
---|---|
IOSignalType |
UIVisible
Indicates if this signal should normally be visible in a user interface. It shall be used as a hint for user interface implementors.
Declaration
public bool UIVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Value
Gets or sets the value of the signal.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
Object |
Remarks
The value is automatically converted to the proper type (see GetValueType()) if possible. As of 2020.3 the value type of a group signal is unsigned (UInt32). It is still possible to set a signed value; if it is negative it will be wrapped to the corresponding unsigned value (e.g. -1 -> 2^32-1).
Exceptions
Type | Condition |
---|---|
ArgumentException | The value is invalid or cannot be converted to the proper type. |
Methods
GetConnections()
Returns an array of I/O connections from this signal to other signals.
Declaration
public IOConnection[] GetConnections()
Returns
Type | Description |
---|---|
IOConnection[] | An array of IOConnection containing the connections. |
GetValueType()
Returns the Type of the Value property for this signal.
Declaration
public Type GetValueType()
Returns
Type | Description |
---|---|
Type | The Type of the Value property. |
Remarks
As of 2020.3 the value type of a group signal is unsigned (UInt32).
GetValueType(IOSignalType)
Returns the Type of the Value property depending in the signal type.
Declaration
public static Type GetValueType(IOSignalType signalType)
Parameters
Type | Name | Description |
---|---|---|
IOSignalType | signalType | Type of signal |
Returns
Type | Description |
---|---|
Type | The Type of the Value property |
Remarks
As of 2020.3 the value type of a group signal is unsigned (UInt32).
IsValidName(String)
Checks if a string is a valid name for an I/O signal.
Declaration
public static bool IsValidName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Boolean |
Pulse()
Sets the value of a digital signal to 1 and back to 0.
Declaration
public void Pulse()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
TrySetValue(Object)
Try to set the specified value on the signal. A value validation is performed. The value is set only if it is valid.
Declaration
public ValueValidationInfo TrySetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
Object | value |
Returns
Type | Description |
---|---|
ValueValidationInfo | A ValueValidationInfo that specifies the result of the validation. |
Remarks
As of 2020.3 the value type of a group signal is unsigned (UInt32). It is still possible to set a signed value; if it is negative it will be wrapped to the corresponding unsigned value (e.g. -1 -> 2^32-1).
ValidateValue(Object)
Check if its possible to set the specified value on this signal, given the signal type and restrictions.
Declaration
public ValueValidationInfo ValidateValue(object value)
Parameters
Type | Name | Description |
---|---|---|
Object | value |
Returns
Type | Description |
---|---|
ValueValidationInfo | A ValueValidationInfo that specifies the result of the validation. |
Remarks
As of 2020.3 the value type of a group signal is unsigned (UInt32). It is still possible to set a signed value; if it is negative it will be wrapped to the corresponding unsigned value (e.g. -1 -> 2^32-1).