Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CODE 128 - FNC2 USAGE

Status
Not open for further replies.

shaunk

Programmer
Aug 20, 2001
402
AU
Hi,

I have successfully coded an algorithm to calculate the checkdigit for a string which includes control characters using Code 128 (subset a). I then add the start and stop characters and all is well - the scanner reads the barcode.

Can anyone tell me what FNC 2 is used for.
The doco tells me it is used to send two symbols at once.
I am trying to use it so the reader scans a SHIFT+TAB.
The string looks like this ( minus the start, stop, checkdigit etc)

"n" & chr(197) & "i" (which equates to SHIFT & FNC2 & TAB
in subset A)

Once I pass it thru the checkdigit algorithm, add the checkdigit, start and stop characters etc, it scans OK but does not perform the reverse tab, it just does a shift, then a tab.

Thanks
 
I am not an expert on 128, but I don't think you can combine keypresses like that. Also the SHIFT refers to a encoding shift rather than a keyboard shift. "The SHIFT character just changes the next character and only changes between Code Set A and Code Set B or the reverse."
For example you are using Code A encoding for some characters then you want to SHIFT to Code B encoding for just the next character. The encoding then reverts back to Code A.
Supposedly "FNC 2 tells the reader to store the data read and transmit it with the next symbol." Not sure what use to make of that.
See Good Luck!
Mike
 
I have since been informed from the manufacturer of the scanner, that combinations of control characters cannot be printed as a barcode since they are not printable ASCII characters. However, the scanner can be be configured to interpret a specific printable ASCII character as any keyboard combination required.
e.g. interpret the character "&" as SHIFT TAB.
We have not yet attempted this but have been told it is a simple series of steps available in the devices reference manual.
Will keep you in the loop.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top