Download WSG Scripting Reference Manual

Transcript
WSG Scripting Reference Manual
Tables can contain the above types and can be nested at a total of up to 5 levels.
The simultaneously read data is returned as a table containing the single frames. Received data is assumed
to be unsigned, so each value is in the range of 0 to 65535.
This command will raise a runtime error, if
you try to communicate with a non-generic finger
you try to communicate with an unpowered finger
the finger is not properly configured or configuration cannot be read
Syntax
<table> = finger.spi( index, data )
Parameters
index (integer)
Finger index. Range is 0..finger.count()-1.
data (table)
Frame data to be sent. See conversion rules above.
Return Value
Table containing the received frame data. It will be of the same length as the given transmit data table.
Example
if finger.type( 1 ) == "generic" then
while true do
sleep( 1000 );
rxdata = finger.spi( 1, 0x1234 ); -- SPI transfer with finger 0
for i=1,#rxdata do -- print out the received data
printf( "%.4Xh ", rxdata[i] );
end;
printf( "\n" );
end;
else
printf( "Cannot read data from a non-generic finger.\n" );
end;
2.8.14 Finger configuration memory – finger.config()
If the finger has a built-in configuration memory, this function allows you to read or write its content.

Accessing the finger configuration is only possible for generic fingers.
Weiss Robotics GmbH & Co. KG
In der Gerste 2
71636 Ludwigsburg, Germany
For updates and further information, please visit
http://www.weiss-robotics.com
Page 64 of 77
© 2013 Weiss Robotics, all rights reserved