User`s guide

Getting Started with Automation Interface
a Enter ddatv = read(cc,address(cc,'ddat'),'double',4).
MATLAB software responds with
ddatv =
16.3000 -2.1300 5.1000 11.8000
b Enter idatv = read(cc,address(cc,'idat'),'int16',4).
Now MATLAB software responds
idatv =
-1 508 647 7000
If you used 8-bit integers (int8), the returned values would be incorrect.
idatv=read(cc,address(cc,'idat'),'int8',4)
idatv =
10-41
c Y ou can change the valu es stored in ddat by entering
write(cc,address(cc,'ddat'),double([pi 12.3 exp(-1)...
sin(pi/4)]))
The double argument directs MATLAB software to write the values to
the processor as double-precision d ata.
d To change idat,enter
write(cc,address(cc,'idat'),int32([1:4]))
Here you w rite the data to the proce ssor as 32-bit integers (convenient
for representing phone numbers, for example).
e Start the program running again by entering the following command:
run(cc,'runtohalt',30);
2-15