Remote-processing BASIC 52 Uživatelský manuál Strana 28

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 163
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 27
RPBASIC-52 PROGRAMMING GUIDE
2-9
CARD$
Syntax: CARD$(expr)
Where: expr = 0 to 3, is the card reader to scan.
Function: Checks card reader for data. If present, returns the site code and card number. If no data is present,
an error code described below is returned. All data is return ed in a string form at.
Mode: Run
Use: $(0) = CARD$(N)
Cards: RPC-52, RPC-320, RPC -330
DESCRIPTION
CAR D$ returns eithe r the site code and card num ber or an error code . The site code and card num ber is
returned in the following format:
"SSS-NNNNN"
Site codes and card numbers have lead ing 0's. The '-' character is used a s a separator.
There are 4 different kinds of error returns possib le. These errors are always in a 2 c haracter "-X" format.
'X' is a number with the following meanings:
1 No card number present
2 Hardware error - both data bits down
3 Parity error
4 Timeout error - some data received
A "-1" return is the most common. It indicates no card was swiped. A "-3" error indicates the card was
improperly swiped.
This comm and w as designed to work with Sensor Engineerin g Co. (P hone 2 03 777 7444) m odel no 31503.
Cards are in a 26 bit format: 2 check sum, 8 site code, 16 data.
Up to 4 card readers may be connected to the digital port at J3. Ports A and B are used to read and control the
readers. Port C m ay be used for additional opto or digital I/O. Port A must be configured as an input and po rt
B an output using the CONFIG LINE 100. . . statement. Port C may be input or output as required. The high
current driver, U12, must also be installed. Each card reader is connected to digital port J3 as follows:
Card Number J3 pins
Hold D1 D0 LED
0 8 21 19 10
1 6 25 23 4
2 3 22 24 1
3 7 18 20 5
The green LED on the reader may be controlled using the LINE# command. A '0' forces the LED to green
and a '1' forces it to red. A yellow LED indicates a card has been swiped and the reader is ready to send the
information.
Zobrazit stránku 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 162 163

Komentáře k této Příručce

Žádné komentáře