Storage media (TiCoBasic)
Media_Write
ADwin
198
ADwin-Gold II
, Manual February 2013
Media_Write
Media_Write
copies blocks of values from an array to the memory card of
ADwin-Gold II
.
Syntax
#Include
GoldIITiCo.inc
ret_val
=
Media_Write
(
start_block
,
count_blocks128
,
source_array
[],
array_start_index
)
Parameters
Notes
Before using
Media_Write
, the array
media_datatable
[]
must be
initialized with
Media_Init
. The instruction
Media_Init
is only avail-
able in
ADbasic
, but not in
TiCoBasic
.
The execution time of
Media_Write
is quite long; therefore we recom-
mend to use it in a process with low priority.
The data transfer speed per data block increases with the number of
transferred data blocks.
The array
source_array
[]
must be dimensioned with at least
count_blocks128
× 128 elements.
See also
Valid for
Gold II-Storage-16
TiCo
s t a r t _
block
Index (1…m) of the first data block on the memory
card which is to be written.
LONG
c o u n t _
blocks128
Number (1…m) of data blocks to be written. A
data blocks contains 128 values of 32 bit.
LONG
s o u r c e _
array
[]
Array from which data is read.
ARRAY
LONG
a r r a y _
s t a r t _
index
Index (1…n) of the first array element to be trans-
ferred.
LONG
ret_val
Status of data transfer:
= 0: The memory card has been completely
erased.
> 0: An error has occurred. Set Bits in
ret_val
refer to the error cause, see table.
LONG
Bit no.
Meaning
00
Bit = 1: Memory card does not reply.
01
Bit = 1: Timeout.
02:32
Bits may be set but cannot be used here.