beautypg.com

Host command set reference – Siemens SIMATIC TIWAY 1 User Manual

Page 111

background image

HOST COMMAND SET REFERENCE

UNILINK HOST ADAPTER

5–26

USER MANUAL

In addition to the bytes specified, 22 bytes will be
added for header information. If this total count is an
odd number of bytes, one byte will be added to make
the count even, so that all macro buffers begin and
end on word boundaries.

bb

The buffer number assigned by the adapter to the buffer pair.
The buffer numbers are returned in the same order as issued.
The buffer numbers will range from 1 to 254 decimal (01 hex to
FE hex). If there was not enough memory to allocate all of the
buffers, only those that were allocated will be returned. If none
were allocated, the list will be empty.

Your applications software should store these buffer numbers as
they are returned, so that they may be referenced in other
commands. You should also record these numbers on the
planning worksheet given in Appendix F.

Example: The total macro memory requirements can be calculated by
summing the memory for each individual macro. For example, suppose that you
use one macro to connect secondary #7, another macro to issue a Primitive 45
bytes long expecting a response 30 bytes long, and another macro to disconnect
secondary #5. The total memory required for these three macros is:

Macro #1, Connect

= 22

= 22

22

Macro #2, Primitive

= 22 + 45 + 30

= 97(+1)

98

Macro #3, Disconnect = 22

= 22

22

___

Total Memory Required

142 Bytes

The ALLOCATE MACRO STORAGE BUFFERS command string to allocate
Macros #1, #2, and #3 is shown below. Notice that the spacing between
parameters is shown for clarity and should not be included when sent to the
adapter.

13 01 0000 0000 002D 001E 0000 0000