SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0-...

23
SL-881: AUX module for shop-floor data acquisition Technical description

Transcript of SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0-...

Page 1: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

SL-881: AUX module for shop-floor data acquisition

Technical description

Page 2: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 2 SL-881_TE

0. General system description

The SL-881 is an AUX module for acquiring shop-floor production data. The employees enter data about the start and end of each job as well as any interruptions and resumptions. Data on the operation (job) code, product code and machine number are entered by keypad. The employee ID is entered automatically at the

end by touching the iButton to the reader cup on the bottom of the unit. The SL-881 has a two row backlit LCD. The top row shows the time and date according to the main controller's (SL-8x) real time clock. The last digit on the top row (0..F) indicates which of the 16 operation group quartets is being shown in the bottom row.

There are 16 capacitive keys (no moving parts) laid out as shown in fig. 1.

Using the and keys, user-defined operation groups can be scrolled four per row (quartets). There is a maximum of 16 times 4 groups, which gives a limit of 64 operation groups.

Fig. 1

Fig. 1 shows the front panel of the SL-881. Case dimensions are: 200x152x62mm.

The general system setup is shown in fig 2.

The SL-881 is connected to an SL-8x controller through the AUX interface. A 4-wire, flat telephone cable is used with RJ-11 4/6 plugs and sockets. The conductors include the power as well as the signal lines.

Up to four SL-881 units can be daisy-chained. Each SL-881 in a chain must have a unique address, set by the DIP switch. The addresses can be between 38H and 3BH for this type of unit. The last unit in the chain must have its jumpers set, as shown in fig. 2.

Fig. 2

The AuxCnf.exe program is used to configure the SL-881 units. This program must be run on the PC which is connected to the SL-8x terminal to which the SL-881 is connected.

The SL-881 has no data buffer, which means that the entered data is transmitted to the master SL-8x immediately.

Page 3: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 3 SL-881_TE

1. Hardware

Fig. 3 shows the SL-881 PCB.

PCB dimensions are: 175x125mm.

The main components are:

- DIP SW

This is for setting the unit address using SW3 and SW4. There can be four different addresses: 38h, 39h 3Ah and 3Bh. These are set as shown in fig. 4. Fig. 3

Fig. 4

- LCD

20x2 character LCD with LED backlight.

For a few seconds after power-on, the SL-881 will display the current firmware version and the address set by the DIP switch.

- Keys

The SL-881 has 16 keys which are made with capacitive matrix elements under the case. This means there are no moving parts and thus no wear and tear even when the unit is constantly in use.

A short beep sounds each time a key is touched.

The key functions will be described in the next section.

- Two RJ-11 6/4 sockets

IN: for connecting to an SL-8x or a previous AUX device in the chain.

OUT: for connecting to the next AUX device in the chain.

- iButton cup connector

Header for the iButton contact cup, which is on the bottom of the device.

- Expansion connectors

Headers for attaching expansion boards e.g. RF reader.

- Jumpers

The last AUX device in the chain must have these two jumpers set. This also applies to a device that is the only one in a chain.

Page 4: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 4 SL-881_TE

2. Using the SL-881 Employees on the shop-floor enter the beginning and end of each operation: operation group and number, ID code of object and machine. Employee ID is entered by touching an iButton to the contact cup on the bottom

of the module. It is also possible to enter an interruption of a job, together with the code of the reason of interruption.

The (UP) and (DOWN) keys are used to scroll up and down among 16 lines of four operation groups (quartets).

By pressing keys 1,2,3 or 4, the operation group currently above the key is selected. Assuming we chose GR01, the screen will be like in fig. 5.

Fig. 5 2.1. Entering digits

Digits are entered from left to right. When a digit is entered, the blinking cursor move to the next location, except when it’s in the rightmost digit location. of the field. Touching any digit key in this case will overwrite the current digit in the last loaction. Touching the (ENTER) key will cause the cursor to jump to the first location of the following data entry field. Editing a previously entered digit in the current field is possible by moving the cursor backwards onto the incorrect digit with the (LEFT) key. When the cursor is on the incorrect digit, simply touch the desired digit.

Moving from field to field is possible with the: (ENTER) and (UP) keys.

If we want to move to the next field, we can touch the (ENTER) key. This will work only if all the digit locations of the current field have been filled.

Touching the (UP) key will move the cursor to the beginning of the previous field unless the current field is the first field. In this case, the unit returns to the main menu, showing groups and the time & date. Any data entered will be lost.

The and keys are used to enter the end of an operation. The difference is that lets you

enter the number of produced units (fig. 6a), while assumes one produced unit, so the unit number field isn’t shown (fig. 6b).

a) b)

Fig. 6

Page 5: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 5 SL-881_TE

When the cursor is in the ID field, data entry is done by touching an iButton to the cup on the bottom of the SL-881. The iButton code will be displayed for about a second, while the data is being sent to the SL-8x. After that, the SL-881 returns to the main menu (fig. 1).

Fig. 7

Page 6: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 6 SL-881_TE

3. Configuration 3. 1. Configuring the SL-8x controller (Cnf8302.exe, Cnf 8402.exe, Cnf88.exe)

The SL-8x controller is connected to the PC running the configuration program either directly (current loop interface, as shown in fig. 2) or through a network by an ethernet adapter.

The AUX device configuration tab is shown in fig. 8. The address of the device has to be entered and the active boxes have to be checked for all the available functions.

In the example shown, the SL-881 is set to 38H and performs two functions: 00 and 01.

- Function 00, with frequency 04.

The SL-8x sends the current time and date to the SL-881 so that it can display this on the LCD. This does not have to be done very fast. Once every few seconds is enough, since the SL-881 can increment the time by itself.

-Function 01, with frequency 01.

The SL-8x reads any data the SL-880 has to send. This is the function that collects data entered into the SL-880 by employees.

Fig. 8

3. 2. Configuring the SL- 881 (AuxCnf.exe)

Choose the COM port which is assigned to the SL-8x controller to which the SL-881 to be configured is connected to. (If the controller is an SL-88, you must also select the correct AUX channel i.e. AUX1 or AUX2.)

Global configuration

1. Produced item count digits

2. Time limit – the SL-881 can return to the first (default) quartet of operation groups from any other displayed quartet or from an abandoned data entry mask. This happens if no key is touched for the configured number of minutes.

3. Interrupt information digits – number of digits to enter for the reason of interruption code.

4. Debounce – key debounce value. The higher this number, the longer one has to touch a key before the key action is performed.

Visible group quartets

Checking the relevant boxes will make the quartets visible. An unchecked quartet will be jumped over during the scrolling process with the UP and DOWN keys.

Fig. 9

Page 7: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 7 SL-881_TE

Object and Machine prompt fields can be changed to any desired 3 characters.

Swap button: this button swaps the configuration data of the two selected group quartets. This is useful if you have several SL-880 units that have the same configuration data, but you want the default quartet to be different, based on the location of the unit.

Operation groups configuration: the drop-down menu let us choose the number of the quartet of operation groups which will be displayed and can be edited.

Group name: enter the names of the groups which will be displayed on the LCD in the currently selected quartet. Each name has 4 characters and should be right justified to be centered above the 1,2,3 and 4 keys.

Page 8: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 8 SL-881_TE

4. Memory map of the EEPROM The SL-881 uses a 512 word EEPROM (93c86) i.e. 1024 bytes. Fig. 10 shows the placement of the parameters in the EEPROM.

Fig. 10

EEPROM addresses 00 to 255 hold the definitions of the 64 opeartion groups. The configuration data of one group uses 8 bytes of 4 EEPROM word locations. The bytes are as follows:

0 GR01_C0 GR01_C1 1 GR01_C2 GR01_C3 2 N.U. GR01_DF3 GR01_ID CRC

GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which uniquely identifies the group,

An operation group must have the same group ID on all SL-881 units on which it is configured to be available,

CRC: CRC for the previous 7 bytes, N.U. not used GR01_DF: defines the number of digits used for the data entry fields..

MA.1, MA.0 number of digits for the machine field

OB.1, OB.0 number of digits for the object field

EEPROM address …

269-319 QT Setup Block & CRC

265-268 Prompt: object,

machine, crc

260 CONFIG …

252-255 Group 64

4-7 Group 2

0-3 Group 1

GR01_DF: 7 6 5 4 3 2 1 0 MA.1 MA.0 OB.1 OB.0 OP.1 OP.0

MA10 Nr.dig 00 0 01 1 10 2 11 3

OB10 Nr.dig 00 2 01 4 10 6 11 8

Page 9: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 9 SL-881_TE

OP.1, OP.0 number of digits for the operation

EEPROM locations 265 to 268 hold the characters for the alternative prompts for the object and machine fields:

Global config

NUM.10: number of digits for number of produced units (entered at the end of the operation).

NUM10 Nr.dig 00 0 01 2 10 4 11 6

TIM_BACK.10: number of minutes of no key activity until unit returns to first quartet (default screen)..

TIM_BACK.10 Nr.min 00 1 min 01 2 min 10 4 min 11 never

INTRR.10: number of digits for interruption code

INTRR.10 Nr.dig 00 0 01 1 10 2 11 3

DBCN.10: key debounce value

OP10 Nr.dig 00 1 01 2 10 3 11 4

268 NU CRC 267 MS1 MS2 266 OB2 MS0 265 OB0 OB1

CONFIG 7 6 5 4 3 2 1 0

DBNC1 DBNC0 INTRR.1 INTRR.0 TIM_BACK.1 TIM_BACK.0 NUM.1 NUM.0

DBCN.10 # 00 2 01 4 10 10 11 20

Page 10: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 10 SL-881_TE

5. PROTOCOL

The AUX interface is a 4-wire bidirectional interface for connecting peripheral units to the SL-8x terminals. The protocol is very similar to the I2C bus, with the two other wires being GND and V+.

Vertical RJ-11 connector pinout:

1 V+ 12V-13,8V, 0,9A max

2 CLK SCL equivalent

3 DATA SDA equivalent

4 GND

The AUX modules can be daisy-chained on the AUX interface, each having an address which is defined by a pre-set base address (for that type of device) and one or more jumpers or DIP switches for setting the sub-addresses.

Each AUX unit has two 4-pin RJ-11 connectors, one for the incoming cable (from the master i.e. terminal), the other towards the following unit in the daisy-chain.

The last (and only the last) unit in the chain must have the two jumpers for pull-up resistors set.

Current firmware on the SL-8x (8x02) supports up to 8 different AUX units connected to a master.

There are two modes of firmware support for AUX devices:

• Cyclic functions

• Commands

5. 1. Cyclic functions

Cyclic functions are carried out regularly (every certain number of cycles of the main SL-8x firmware loop) and are defined as follows:

The address of the unit defines the type of AUX unit (due to the range of addresses allotted to specific types of AUX units). The firmware of the SL-8x terminals knows how to handle AUX units based on their addresses. As new AUX units are made available, the firmware will be updated to handle the new devices.

Certain AUX units have more than one command that can be carried out cyclically. In this case, these commands are given function numbers. Thus, the user can define which commands of the AUX unit in question will be called and with which frequency.

The correspondence between (address,function no.) pairs and what this means in terms of commands to the AUX unit is fixed in the SL-8x firmware.

Example:

The SL-881 as described previously in this document can carry out two cyclic functions:

• Function 00: the SL-8x terminal sends the current time & date to the SL-880 for it to display

accurate time & date data on its display. (The SL-880 hasn’t got its own clock chip.) • Function 01: the SL-8x terminal requests registration data (ID code and keyed data) to be sent.

Function 00 can be carried out once every 10 seconds, since the SL-881 can update the clock data by itself for short periods, whereas function 01 has to be done at much smaller intervals (under 1s) so the person

Page 11: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 11 SL-881_TE

who’s just made a registration sees immediate confirmation from the SL-881 and the next person can start entering data.

5. 2. Commands

Commands are carried out as a result of commands received by the SL-8x terminal from a master PC. They are usually done as a result of human intervention: status read or configuration of an AUX unit. Commands are received by the SL-8x and put into the AUX queue ahead of cyclic functions. There is no queue for multiple AUX commands, so the previous command has to be finishe before a new one can be started. Direct commands from the master PC to an AUX unit are possible using two terminal commands: AuxTx (‘x’) and AuxRx (‘z’). These commands are carried out immediately and have a higher priority than the cyclic AUX functions defined in the CNF8x02 program. The mechanism is as follows: If the user wants to send a command to an AUX unit, the command is sent to the terminal, which then sends it on to the AUX unit in the next cycle. If the command is such that it will generate a reply from the AUX unit, this reply is read from the AUX unit in the following (or one of the following, if an error occurs) cycle and is then put into the AuxCmd.buffer. This buffer is read by the master PC with an AuxRx command. The data flow is as follows: If we want to read EEPROM location 32h on the AUX unit with the address 02h, the master PC would send the following string to the terminal with the AuxTx command: “02R32” When the terminal receives the string, the following happens:

1. The ‘02’ is converted into a number and placed into AuxCmd.addr 2. “R” is placed as-is into location 01 of AuxCmd.buffer. Location 00h contains the number of bytes to

send (02h in this case).

Buffer[0] Buffer[1] Buffer[2] 02h ‘R’ 32h

3. ‘32’ is converted into a number and placed into the following location of the AuxCmd.buffer.

Note that the string is parsed such that the first two characters ‘02’ are converted to a single byte, the next character ‘R’ is copied as-is into buffer[1]. All the following characters in the string are hexadecimal high and low nibbles and are converted into numbers before being stored in AuxCmd.buffer.

4. After receiving and parsing the string, the AuxTx command (firmware of the SL-8x terminal) checks

the LSB of the command letter (‘R’ i.e. 52h in this case) and since it’s 0, the AuxCmd.status field is filled with 3. This means that after having sent the contents of the buffer to the AUX device, the terminal expects to receive an answer in the next cycle and will try to read data from that AUX device.

5. The AUX device will receive the bytes in AuxCmd.buffer[0] to AuxCmd.buffer[2], recognise the ‘R’

command to mean “ReadEEPROM”, read address 32h of the on-board EEPROM and prepare the following in its own transmit buffer:

TXbuf[0] TXbuf[1] Txbuf[2] Txbuf[3] TXbuf[4] 04h ‘R’ 32h 12h 34h

Page 12: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 12 SL-881_TE

TXbuf[0] this is the number of bytes to be sent, not including the length byte itself TXbuf[1] these two bytes are copies of the original command and its parameter TXbuf[2] TXbuf[3] this is the actual data read out from the EEPROM TXbuf[4] (we assume that 1234h was the 16-bit value read from address 32h)

In the next cycle, the terminal will read data (Txbuf[0] to Txbuf[4]) from the AUX device, place it into the AuxCmd.buffer, set AuxCmd.status = 8 to indicate that there is data ready to be read, and wait for an AuxRx command from the PC. 5. 3. The AUX protocol The AUX bus has READ and WRITE cycles like the I2C it is based upon. The Write cycle is shown in fig. 10. Here, the master writes data into the slave’s buffer. When the R/W bit is 0, it is a Write cycle. When the R/W bit is 1, it is a Read cycle.

Fig. 10 Fig. 11 shows a Read cycle. The master starts reading data from the slave’s buffer right after the first byte.

Fig. 11

5. 3. 1. The 'T' command (Receive Time) The SL-8x writes into the SL-881's receive buffer:

- The 'T' command - 6 bytes, which represent the current time and date.

The format is shown if fig. 12.

Fig. 12

The 'W' command (Write to EEPROM)

S Slave Address 1 A A P

START bit

R/W

acknowledge from slave

acknowledge from master

DATA

n bytes last byte

S Slave Address 1 A A P

START bit

R/W

acknowledge from slave

acknowledge from master

DATA

n bytes last byte

S Slave Address 1 A A P

START bit

STOP bitR/W

acknowledge from slave

acknowledge from master

DATA

n bytes last byte

No acknowledge from master

1

No acknowledge from master

1

S Slave Address 0 A DATA P

START bit

R/W

acknowledge from slave

S Slave Address 0 A DATA P

START bit

R/W

acknowledge from slave

S Slave Address 0 A DATA P

START bit

R/W

acknowledge from slave

n bytes

S Slave Address 0 A DATA P

START bit

R/W

acknowledge from slave

S Slave Address 0 A DATA P

START bit

R/W

acknowledge from slave

S Slave Address 0 A DATA P

START bit

STOP bitR/W

acknowledge from slave

n bytes

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

STOP bitSTOP bit

S 0 A A

START bit

R/W

S 0 A A

START bit

R/W

S 0 A A

START bit

R/W

SL-881 Address ’T’ <DAY>

PP

STOP bit

P

STOP bit

A

<MONTH> A <YEAR> A <HOUR> A

<MINUTE> A <SECOND> A

Page 13: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 13 SL-881_TE

5. 3. 2. The 'W' command (Write) The SL-8x writes into the SL-881's receive buffer:

- The 'W' command, - The address of the EEPROM to write to - Two bytes of data to write into the EEPROM. The format is shown in fig. 13.

S 0 A A

P

START bit

R/W

acknowledge from slave

acknowledge from slave

S 0 A A

P

START bit

R/W

acknowledge from slave

acknowledge from slave

S 0 A A

P

START bit

STOP bit

R/W

acknowledge from slave

acknowledge from slave

SL-881 Address ’W’ EEPROM Address

acknowledge from slaveacknowledge from slave

A

acknowledge from slave

<DATA1> <DATA2>

EEPROM_H adr. nakoju upisujemo

Prvi bajt zaupis u EEPROM

Drugi bajt zaupis u EEPROM

acknowledge from slaveacknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

A

acknowledge from slave

EEPROM Address

EEPROM_H adr. nakoju upisujemo

A

acknowledgefrom slave

A

acknowledgefrom slave

A

acknowledgefrom slave

Fig. 13

5. 3. 3. The ‘R’ command (Read from EEPROM) The SL-8x writes into the SL-881's receive buffer:

- The ‘R` command - The address of the EEPROM from which to read

The format is shown in fig. 14

Fig. 14 In the next cycle, the SL-8x terminal reads the prepared data from the SL-881’s buffer. The format of this is

shown in fig. 15.

Fig. 15 In total, 5 bytes are read:

- 04h: the length of the data to be read, - 'R', the original command

S Slave Address 1 A

START bit

R/W

acknowledge from slave

S Slave Address 1 A

START bit

R/W

acknowledge from slave

S Slave Address 1 A

START bit

R/W

acknowledge from slave

4 ’R’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledge from masteracknowledge from masteracknowledge from master

<Addr.> AAA

acknowledge from masteracknowledge from masteracknowledge from master

<DATA1> AAA

acknowledge from masteracknowledge from masteracknowledge from master

<DATA2>

No acknowledge from master

1 PP

STOP bit

P

STOP bit

No acknowledge from master

1 PP

STOP bit

P

STOP bit

Page 14: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 14 SL-881_TE

- <Addr>: the EEPROM address from which the data was read, - <DATAH><DATAL>: the 2 bytes of data read from the EEPROM.

5. 4. The ‘P’ commands – commands related to the QT chip These commands are related to the Quantum QT60168-AG chip, which controls the capacitive matrix keyboard. 5. 4.1. P 10h (QT_2IRAM_GET_CRC) This command makes the SL-881 controller read out the setup block from the QT chip and store it in RAM. The protocol is as follows. The SL-8x sends the following to the SL-881, fig. 16:

10hP

Fig. 16 The setup block (100 bytes) and the CRC byte are read out from the QT chip and stored in RAM by the SL-881’s controller. A 100-byte block is too large to be sent in one message to the SL-8x. For this reason, there are four separate commands: P 00h, P 01h, P 02h and P 03h, which are used to transfer one of four 25-byte blocks of the data. The P 10h command itself, only transfers the CRC byte in the next AUX cycle, slika 17:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

<CRC> 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

10h

Fig. 17

Page 15: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 15 SL-881_TE

5. 4. 2. P 0kh (QT_GET_BLOCK_0) The P 0kh commands (where k= 0,1, 2, 3) transfer the k-th of four 25-byte blocks of QT setup data to the SL-8x terminal. The SL-8x sends the following to the SL-881, fig.18:

0khP

Fig. 18 In the next AUX cycle, the SL-8x reads the following from the SL-881’s transmit buffer, fig. 19:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

27 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledge from masteracknowledge from masteracknowledge from master

<CRC>

No acknowledgefrom master

0kh

acknowledge from masteracknowledge from masteracknowledge from master

<DATA[25k+1]> AAA <DATA >[25k+24] AAA. . . 11

Fig. 19

Page 16: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 16 SL-881_TE

5. 4. 3. P 3kh (KEY_CAL) The P 3kh command (k= 0, 1, 2, …, F) is used to calibrate individual keys. It returns an error/success code. The SL-8x sends the following to the SL-881, fig. 20:

3khP

Fig. 20 In the next AUX cycle the SL-8x reads the following from the SL-881, fig 21. If there is no error:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

0 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

3kh

Fig. 21 If there is an error, fig. 22:

Fig. 22

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

FF 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

3kh

Page 17: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 17 SL-881_TE

Key table:

k Taster k Taster 0h F2 8h F1

1h 5 9h 0

2h 4 Ah 9

3h 3 Bh 8

4h 2 Ch 7

5h 1 Dh 6

6h Eh 7h Fh

Page 18: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 18 SL-881_TE

5. 4. 4. P 6kh (ST_DATA) The P 6k commands (k= 0, 1, 2, …, F) read out the data set and current status of individual keys. The SL-8x sends the following to the SL-881, fig.23:

6khP

Fig. 23 In the next AUX cycle, the SL-8x reads the following from the SL-881 buffer.

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledge from masteracknowledge from masteracknowledge from master

<CRC>

No acknowledgefrom master

6kh

acknowledge from masteracknowledge from masteracknowledge from master

<KEY_DATA1> AAA <KEY_DATA8> AAA. . . 11

Fig. 24

Page 19: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 19 SL-881_TE

5. 4. 5. P 55h (FORCE_RESET) This command resets the QT chip, fig. 25. An error/success code is returned.

55hP

Fig. 25 In the next AUX cycle, the SL-8x reads the following from the SL-881’s transmit buffer, fig. 26. No error:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

0 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

55h

slika 26 Error, fig. 27:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

FF 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

55h

Fig 27

Page 20: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 20 SL-881_TE

5. 4. 6. P 5Ah (CAL_ALL) This command causes all keys to be calibrated, fig. 28. An error/success code is returned.

5AhP

Fig. 28 In the next AUX cycle, the SL-8x reads the following from the SL-881’s transmit buffer. No error, fig. 29:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

0 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

5Ah

Fig. 29 Error, fig. 30:

S 1 A

START bit

R/W

acknowledge from slave

S 1 A

START bit

R/W

acknowledge from slave

S SL-881 Address 1 A

START bit

R/W

acknowledge from slave

3 ’P’ AAA

acknowledge from masteracknowledge from masteracknowledge from master

AAA

acknowledgefrom masteracknowledgefrom masteracknowledgefrom master

FF 1 PP

STOP bit

P

STOP bitNo acknowledge from master

1 PP

STOP bit

P

STOP bit

5Ah

Fig. 30

Page 21: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 21 SL-881_TE

5. 5. Data message format (between the SL-881 and SL-8x)

S Start message 1 2 3 4 5 6 7 8 9 1

0 11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

‘S’

G1

G2

G3

G4

G5

O1

O2

O3

O4

O5

O6

O7

O8

I1

I2

I3

I4

I5

I6

I7

I8

M1

M2

CRC

Where: ‘S’ Start message indicator, i.e. the start of an operation (job) G1..G5 operation data G1 group ID G2..G5 BCD data representing keyed-in digits O1..O8 object data i.e. the code of the product being worked on. BCD data representing keyed-in

digits. I1..I8 ID code of the employee i.e. iButton code M1..M2 machine data. BCD data representing keyed-in digits. CRC 8-bit CRC of all transmitted bytes including ‘S’

E End message 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ‘E’ N1 N2 N3 N4 I1 I2 I3 I4 I5 I6 I7 I8 CRC ‘E’ End message indicator, i.e. the end of an operation (job) N1..N4 number of units produced. BCD data representing keyed-in digits I1..I8 ID code of the employee i.e. iButton code CRC 8-bit CRC of all transmitted bytes including ‘E’

Page 22: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 22 SL-881_TE

6. Terminal commands for AUX commands The following commands from the PC to the master terminal concern direct commands to AUX units.

6. 1. AuxTx ‘x’ Transmits a string to the AUX unit with the address AA. The string contains the command letter C and the data (DD) (optional). PC → SL-8x

N(AA)C(DD)...(DD)<LRC> Where: N: number of transmitted characters + 20h

This number includes AA (2 characters) , C (1 character) , DD (2 characters each) and LRC (1 character)

(AA) address of AUX unit C command (DD) Data (0 to 18 bytes) SL-8x → PC

<ACK> ‘0’ OK <ACK> ‘1’ AuxCmd channel busy

The terminal will send the characters to the AUX device with address (AA) in the next cycle. If the send routine is successful, the state machine needs to know if there is to be an answer from the AUX device in the form of a string that needs to be received in the following cycle. This is achieved by a convention stating that the last bit of the command letter is: 0 (xxxx xxx0): returned data expected (status <- 03) 1 (xxxx xxx1): no returned data expected (status <- 01) So, if the command letter is ‘odd’: ‘a’ (71h),’c’ (73h), ‘e’ (75h), etc. the associated command must be one that doesn’t generate a reply from the AUX device, while the ‘even’ letters: ‘b’ (72h), ‘d’ (74h), etc. have to be associated to commands that all generate a reply from the AUX device.

6. 2. AuxRx ‘z’ Receives the contents of the Aux command buffer if it’s ready (has been filled with data from an AUX unit as a result of a previous command sent to it by AuxTx). SL-8x → PC

N(AA)C(DD)...(DD)<LRC> Where: N: number of transmitted characters + 20h

This number includes AA (2 characters) , C (1 character) , DD (2 characters each) and LRC (1 character)

(AA): address of AUX unit

Page 23: SL-881: AUX module for shop-floor data acquisition · 2 N.U. GR01_DF 3 GR01_ID CRC GR01_C0- GR01_C3: characters of the 4 letter group name, GR01_ID: group ID, an arbitrary byte which

CardWare 23 SL-881_TE

C: command (DD) Data (0 to 18 bytes) or <ACK> ‘1’ Aux command buffer not ready <ACK> ‘2’ N in command buffer <3 or >20