|The Mule User Manual|
|Home Barcode Mill Barcode Fonts How to order Email us|
Revised April 2002
The Mule is usually powered from the computer keyboard circuit. Optionally The Mule and/or the connected RS232 device may be powered from an external Power Unit. The power supply should provide 9-12v DC at about 300mA. The central pin is positive.
When the green LED is illuminated it indicates that the Mule is ready to receive data from the RS232 device. It will turn off while the data is being transmitted to the computer.
The red LED warns when the computer keyboard voltage is low. See the paragraphs entitled 'Device Power Source' and 'Overload Warning LED' for further details.
This completes the basic setup procedure for a computer having a standard PC/AT keyboard. A suitably configured RS232 device may now be connected to the 9 way 'Dee' connector on the Mule.
You should refer to the following sections for further information to finalise the configuration.
The RS232 connector on the Mule is a 9 pin male 'Dee' connector configured similarly to many PC computers. The pin numbering is shown below.
Pin 4 on the RS232 connector may optionally be used to supply power for the RS232 device. Pin 4 has been chosen for this purpose to provide compatibility with the normal DTR function usually connected here. The actual power output depends on the way the links are fitted. Refer to the Link Configuration Table below.
The computer keyboard voltage is monitored continuously by the Mule. If the Mule is configured to power the RS232 device from computer keyboard circuit the red 'Overload' warning LED will light up if the computer cannot supply sufficient power. (Note that a brief indication when the computer is powered up is normal) If this happens you should reconfigure the links inside the Mule and the RS232 device to use an external power source. If using an external power source to power a scanner - the regulator inside "The Mule" can support devices requiring up to about 300mA continuously and more if drawn intermittently.
The Mule requires a RTS/CTS handshake if no loss of data is to be guaranteed under all circumstances. However operation without a handshake is usually possible if your data is sent in bursts of 50 bytes or less with a pause between each burst long enough for the data to be transferred to the computer. Most barcode scanners and similar devices output packets of data in this way. If the Mule's internal buffer overflows it inserts a 'keyboard overrun' scancode into the data being sent to the computer. Most computers respond to this by sounding a warning beep. If this occurs then characters have probably been lost. An occasional beep sound from the computer is evidence of a RS232 handshaking problem.
RS232 devices using two different RTS/CTS handshake schemes are in common use. One type will transmit whenever the Mule asserts RTS (the CTS line is disregarded). The other will not respond to RTS unless it is asserted only after it asserts CTS. Either scheme may be selected by the DIP Switch. Choose whichever works best. Some devices work equally well with either handshake type selected.
Warning: Altering the DIP Switches or Links with the Mule powered may cause permanent damage and will void any warranty.
The DIP Switches and Links are located on the circuit board in the positions indicated in the figure. Use the following procedure to gain access to the circuit board.
Ensure the Mule is unpowered. Remove the 4 screws from the sides of the Mule and lift the cover. After making any changes ensure that no conductive or other foreign objects have fallen inside. Replace the cover before repowering the Mule.
Important: Not more than 1 link is permitted in each group
* Default configuration
|Switch Numbers||Switch Numbers||RS232 Baud Rate|
|on||on||19200 (Not Guaranteed)|
|off *||8 data bits, no parity|
|on||7 data bits + any parity bit|
|off *||Half handshake, RTS given when ready. CTS ignored.|
|on||Full handshake, RTS asserted only after CTS.|
|off *||RS232 timeout, switches to KeyWedge after 100mS.|
|on||RS232 timeout, switches after 500mS. (See note 1)|
|Switch Numbers||Switch Numbers||Keyboard type selection|
|6||7 || off || off *||PC/AT and most PS2s. (Most computers since 1988)|| on || off ||PC/XT. || off || on ||PS2 models 30 & 25. || on || on ||PC/AT (Pad numbers - see note 2) |
|off *||Normal operation (See note 3)|
|on||Swap the case of Alphabetic characters.|
|Switch Numbers||KeyWedge Transmission speed (cps)|
|off||off||12.5 ... Slowest|
|on||on *||100... Fastest|
* Default configuration
DIP Switch Notes
The default operating mode for the Mule is ASCII mode. Characters received at the RS232 port are assumed to be ASCII and the appropriate keystrokes are emulated. Virtually all the printable ASCII characters can be emulated as either a simple keystroke or a shifted keystroke. The number keys emulated are those along the top of the keyboard. The numeric pad numbers are not used as the Mule cannot know the state of the keyboard Num Lock.
The only ASCII control codes to be emulated by simple keystrokes are: CR, BS, TAB and ESC. All other ASCII codes up to and including code 255 are emulated by an ALT key sequence. For example the character represented by ASCII code 123 is emulated by the key sequence ALT down, Pad 0, Pad 1, Pad 2, Pad 3, ALT up. Provided link 3 is made, the special ASCII control code SI is used by the Mule to access Scancode mode. This is described later.
Note that the Mule emulates scancodes not characters. The scancodes are mapped to particular characters within the computer. Some countries (not the USA) require a keyboard driver. If you find some of the characters consistently converted incorrectly you may not have an appropriate keyboard driver loaded or you may be using a version of "The Mule" intended for a different country where some characters are mapped to different keyboard positions. This problem may be overcome by using scancode mode for those characters.
Many keys like the function and cursor keys have no ASCII counterparts and cannot be directly emulated from ASCII mode. Many application programs require operation of these keys and the Mule includes a special means of emulating them. Using scancode mode every single key on the keyboard is accessible. Every possible simultaneous combination of keys and every possible sequence of simple or combinational keystrokes may be emulated. For example you may wish to emulate the combinational keystroke Shift-Alt-F1. This would be impossible in ASCII mode but with Scancode mode it is simple. Scancode mode with its unique flexibility is unique to the Altek Mule.
To understand and use Scancode mode you need to know how the keyboard encodes keystrokes. When any key is depressed a code number is sent to the computer. This code is called a 'scancode'. Each key has a unique scancode. The scancode bears no relation to the character appearing on the keycap. It is simply a reference to the physical position of the key on the keyboard. When the key is released a different scancode is sent to the computer. By processing these scancodes the computer can work out which key or combination of keys has been pressed. Scancodes may consist of one or more bytes.
Scancode mode is entered by sending the ASCII control code SI to the Mule (providing link 3 is in place). The Mule remains in scancode mode until it receives the ASCII control character SO. Alternatively scancode mode will be 'Auto-exited' if a character alien to scancode mode is received. (e.g. any ASCII character other than: ABCDEFabcdef0123456789 and SO). In this case scancode mode is cancelled and the alien character will be sent as a normal keystroke.
If you wished to send the SI code as a proper keystroke rather than entering scancode mode this may be done by transmitting the SI character twice. Each scancode byte is sent as a pair of ASCII hexadecimal characters. Capital or lower case characters are treated as being identical. A single hexadecimal character followed by an exit or auto-exit from scancode mode is discarded. If you wish to prevent entry to scancode mode Link 3 should be opened. This may be the best approach if you wish to send a binary file and it is not convenient to duplicate all the SI codes.
|Scancode mode example:||To emulate `Shift-Alt-F1`|
|Keystrokes Required||PC/AT Scancode||PC/XT Scancode|
|1 Enter scancode mode||&H0F||&H0F|
|2 Shift key down||"12"||"2A"|
|3 Alt key down||"11"||"38"|
|4 F1 key down||"05"||"3B"|
|5 F1 key up||"F005"||"BB"|
|6 Alt key up||"F011"||"B8"|
|7 Shift key up||"F012"||"AA"|
|8 Exit scancode mode||&H0E||&H0E|
To send these codes to a computer with a PC/AT keyboard using the BASIC computer language the following expression might be used...
Note that the SO character may be omitted if the trailing character is alien to Scancode mode, for example a Carriage Return or Line Feed code. e.g.
Q The Mule will not send anything to the computer. Everything else seems OK. The keyboard works normally.
A You probably have the keyboard leads into the Mule reversed.
Q Most ASCII characters are OK but a few are consistently 'wrong'.
A Outside the USA many countries have a special keyboard layout. For those countries you must have the appropriate version of "The Mule" and you must be using the appropriate keyboard driver. If you wish to use "The Mule" in a different country you may have to use scancode mode for the 'wrong' characters.
Q My application has been running in the past with no problems. I now have a new computer and I can't get it to work correctly.
A Your new computer may have a different type of keyboard. You will need to change the Mule DIP switches. If you are emulating non ASCII keystrokes you will also have to change the Scancode data.
Q While using the Mule the computer sometimes beeps. The data often has characters missing and some characters are incorrect.
A If the RS232 buffer in the Mule overflows an 'overrun' scancode is inserted into the data stream. This will sound the computer beeper to warn of the error. Check your RS232 handshake. If you cannot use a proper handshake then insert a delay into the RS232 data after about every 50 bytes.
Q How do I send the £ (UK currency) symbol?
A In ASCII mode there is no straight forward solution. You could try ASCII code 156 or 163. The best solution might be to send it in Scancode mode - "1226F026F012" if using a PC/AT keyboard.
Q I am attempting to send a binary computer file to an application but after being transferred the data contains blocks of garbage.
A If your data contains the ASCII SI character you will be entering scancode mode erroneously. It is best to send binary files with Link 3 removed.
Altek products are checked at every stage of manufacture and every unit is individually tested just prior to despatch. It is most unlikely that goods are faulty straight from the factory. Of all the 'faults' notified to us virtually all turn out to be user errors, computer faults or incompatibilities, cabling or connector faults, or programming errors. If you believe an Altek product is faulty please contact our returns department before returning it to us. You will be asked to describe the problem and we may ask you to speak to one of our engineers. If we feel the goods may be faulty we will give you a Returns Number which must be quoted with the returned goods. Goods returned without a Returns Authorisation Number will inevitably be subject to delay. Goods returned as 'faulty' and found to be fault free may incur a testing charge. Please note our technical support team cannot answer general computer or applications-specific enquiries. You may contact our technical support team from the email link at the head of this page.
|Top Home||© Lee Allen,2018|