Welcome Guest, you are in: Login

ScrewTurn Wiki



Search the wiki


UDP Port Element

Modified on 2016/05/17 16:34 by Maria Categorized as Base Elements, Communications, Elements
Element Icon UDP Port element
Category: Communication AddIn: Base Elements
Creator: OkazoLab Team Scope: Parent Event
Owns Snippets: no Usage: Runtime Screen,Snippets

Element actions aligned with epochs of the parent event



Generic Properties

NameDescriptionAttributesValue TypeProxy Reflex
Remote addressThe network address of the remote computer in IP format: xxx.xxx.xxx.xxx String
Remote portThe UPD port number on the remote computer Int32
Local addressThe network address of the local computer in IP format: xxx.xxx.xxx.xxx String
Local portThe UPD port number on the local computer Int32

+=== Properties inherited from clSerialPortElement === Inherited properties of clSerialPort
NameDescriptionConstraintsValue TypeUpon Runtime Change
Working ModeDefines a working mode for the element. Select 'Auto Output' mode for sending data synchronously with an onset of the parent event, 'Input Detection' mode for catching the particular pattern in port input and 'Manual Output'/'Input Listener' modes for custom writing/reading scenarios controlled via snippets.Struct,Int32
EncodingThe encoding method that is used to convert raw port bytes into text strings and vice verse. The default encoding is ByteChar which converts each byte of data to a single char.Struct,Int32
Buffer SizeSize of the input circular buffer (in bytes) that stores all incoming port data, when the element works in the 'Input Listener' mode. If the buffer is small, a part of the data can be lost before it is read by the program. Int32
Test OutputInitiates a single output transfer through the port by sending the current content of the Output Buffer property
Output BufferText buffer that accumulates data meant to be sent through the port. String
Send NowRuntime action that initiates an instant transfer of the current output value through the port. Manual runtime calls of this action are required if the element works in the Manual Output mode.BooleanAssigning "true" to the linked Proxy in snippets initiates a single action call
Test InputStart a dialog window that monitors arriving port input in realtime. Useп for verification of the selected port settings and encoding method.
InputReturns the most recent content of the circular input buffer, when the element works in the Input Listener. The property is refreshed automatically on each OnRunning cycle, therefore, a property value should be read in the Running snippet.String
Triggering InputWhen the element works in the 'Input Detection' mode, the value of this property defines the 'catching' input string. If such string is detected an incoming input at some moment, the element registers the detection time and becomes triggered. This property is essential for time-accurate registration of the specific input, e.g button press, coming out of a external device. String
Trigger OnceDefines whether the element can be triggered multiple times, while the parent event is active. If the property value is 'true', only the first triggering is registered. Triggering can occur only in the 'Input Detection' working modeBoolean
Runtime Status
Is Input LostIndicates that a part of the input has been lost due to large amount of incoming data at runtime or due to an insufficient size of the input buffer. Try to increase the buffer size or reduce a processing load when the element is active. Boolean
Is TriggeredIndicates whether the element has been triggered at least once, since activation of the parent event. Triggering can occur only in the 'Input Detection' working modeBoolean
Trigger TimeIndicates the local event time of the last element triggering. Triggering can occur only in the 'Input Detection' working mode.UInt64

+=== Properties inherited from clElement === Inherited properties of clElement
NameDescriptionConstraintsValue TypeUpon Change
Is EnabledIf set to false the element is completely omitted when the experiment is run.Boolean
TitleTitle of the element.String

UDP Port element allows bidirectional data exchange through a computer network (by the UPD protocol). The element can be used for sending digital codes that are synchronized with events in your experiment. Also, the UDP port element can be used for asynchronous data transfers to the external devices.


Short description


Snapshot 1

Snapshot 1

Snapshot 2

Snapshot 2

Practical Use

Technique 1

  1. Step 1
  2. Step 2

Technique 2

  1. Step 1
  2. Step 2

 // Check the trial outcome. Result and RT just other user variables
// insert code snippet here..


Insert Notes here..

  Name Size
- UDPPortElement.png 32.41 KB

ScrewTurn Wiki version Some of the icons created by FamFamFam.