SumUp

The subfolder SumUp contains low-level blocks that allow writing or reading multiple ADS symbols with one API call. Compared to simple ADS Read or Write statements, only one handle is needed for writing or reading multiple symbols with the SumUp. The handle can in turn contain several subcommands that are sent simultaneously to the TwinCAT 3 Runtime.

SumUp 1:

Init SumUp

The block Init SumUp initializes the ADS SumUp. If the call is successful, the block returns a handle to the ADS SumUp.

SumUp 2:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[1] bAutosend

Autosend flag enables automatic sending of the SubCommand

[5] SumUp mode

SumUp modes:

  • Write
  • Read

[6] SumUp handle

Handle on the SumUp

Add SubCommand

The block Add SubCommand initializes a new subcommand and adds it to the SumUp handle.

SumUp 3:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[5] [6] SumUpHandle

Handle on the SumUp

[7] [8] Symbol

ADS symbol consisting of AMS address and symbol designation:

  • AMS address: A compilation of AMS NetId and AMS port.
  • Symbol designation: Symbol name or index group/offset

Examples of the symbol name:

  • AMS address and symbol name: 127.0.0.0.1.1:851::MAIN.Var
  • AMS address and index group/offset: 127.0.0.0.1.1:851::0x1234/0x12345

Put Data

The block Put Data adds new data to the initialized sub-command. For this, the block needs the symbol name to identify the sub-command. The block can only be used for writing SumUp commands.

SumUp 4:

Input/output

Meaning

[0] [4] Handle

Handle to the client.

[5] [6] SumUpHandle

Handle on the SumUp

[7] Symbol

ADS symbol consisting of AMS address and symbol designation:

  • AMS address: A compilation of AMS NetId and AMS port.
  • Symbol designation: Symbol name or index group/offset

Examples of the symbol name:

  • AMS address and symbol name: 127.0.0.0.1.1:851::MAIN.Var
  • AMS address and index group/offset: 127.0.0.0.1.1:851::0x1234/0x12345

[9] WriteData

Data that is to be written

Get Data

The block Get Data retrieves new data from the initialized sub-command. For this, the block needs the symbol name to identify the sub-command. The block can only be used for reading SumUp commands.

SumUp 5:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[5] [6] SumUpHandle

Handle on the SumUp

[7] Symbol

ADS symbol consisting of AMS address and symbol designation:

  • AMS address: A compilation of AMS NetId and AMS port.
  • Symbol designation: Symbol name or index group/offset

Examples of the symbol name:

  • AMS address and symbol name: 127.0.0.0.1.1:851::MAIN.Var
  • AMS address and index group/offset: 127.0.0.0.1.1:851::0x1234/0x12345

 

[9] Wait?

Wait flag that defines whether to wait for the data to be read.

  • True: The block waits until the timeout to see if the new data has come in.
  • False: The block does not wait for the new data.

[15] Read Data

The data to be read

Enable Autosend

The block Enable Autosend enables the automatic sending of the SumUp command.

SumUp 6:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[1] bAutosend

The Autosend flag enables automatic sending of the SubCommand

[5] [6] SumUpHandle

Handle on the SumUp

Notice

Sub-commands without data

Automatic sending fails for initialized sub-commands that do not contain any data.

Send SumUp

The block Send SumUp sends the sub-commands added to the SumUp handle to the TwinCAT 3 Runtime. In contrast to SumUp, the Send SumUp must be explicitly called cyclically to send the data to TwinCAT.

SumUp 7:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[5] [6] SumUpHandle

Handle on the SumUp

Notice

Sub-commands without data

Sending fails for initialized sub-commands that do not contain any data.

Release SumUp

The block Release SumUp releases the SumUp handle from memory.

SumUp 8:

Input/output

Meaning

[0] [4] Handle

Handle to the client

[5] SumUpHandle

Handle on the SumUp