Assignment Port Description
An Assignment port is a Digital port that can be used to assign a set of predefined or runtime-determined values to target ports. The assignments take place at the moment the Assignment port is switched from
High. After applying all assignments the line is set to
Low again, to make the Assignment port ready for new assignments. Thus, an Assignment port will always appear to be
An Assignment port contains a number of predefined assignment settings that use the following schema:
<targetPortID> = <value>
When doing the assignments the original source (internal or user) that changed the Assignment port is passed to the target ports.
Assignments are performed in alphanumerically sorted order of target port IDs. Only one assignment is done per target port, even if multiple assignments have been specified for this port.
This section contains the assignment specifications belonging to the Assignment port with ID
They use the following schema:
<targetPortID> = <value>
targetPortID must be a valid ID of a port in the current configuration.
value is a string representation of the value that is to be assigned. You can also use a ValueResolver.
The rules for target ports are:
- Digital port: Is set to
Lowif the determined value is 0 and to
Highin all other cases.
- Analog port: The value is expected to be a floating point number between 0 and 1, inclusive. The relative value of the target port is set from this value, with 1 representing the value
2^resolution - 1.
- Dial port: The target port's position is set to the value which is treated as a 64 bit signed integer.
- Select port: The target port's position is set to the value which is treated as a 16 bit unsigned integer.
[General] SlaveName = Assignment Port Example [Connection] Transport = TCP [Root] Digital1 = 1 Digital2 = 2 Analog1 = 3 Dial1 = 3 Dial2 = 4 Select1 = 5 Assignment1 = 6 WebServer = 9999 [Digital1] Type = DigitalPort Mode = Output [Digital2] Type = DigitalPort Mode = Output [Analog1] Type = AnalogPort [Dial1] Type = DialPort ; This Dial port's value is assigned to be the 10-fold value of Dial1. [Dial2] Type = DialPort Maximum = 1000 [Select1] Type = SelectPort [Select1.Labels] Select Label 1 = 0 Select Label 2 = 1 [Assignment1] Type = Assignment [Assignment1.Assignments] Digital1 = 1 Digital2 = 0 ; Analog ports are assigned using a relative value between 0 and 1 Analog1 = 0.5 ; use a value resolver with a multiplier of 10 to assign Dial2 Dial2 = Dial1(10) ; Select ports' label positions are always 0-based Select1 = 1 ; This node starts a web server at http://localhost:8080 [WebServer] Type = Plugin Driver = ../plugins/WebServerPlugin/WebServerPlugin Readonly = True