Recent

Author Topic: Problem with manage scan params in SymScan  (Read 1821 times)

mmelwin

  • New Member
  • *
  • Posts: 24
Problem with manage scan params in SymScan
« on: May 10, 2022, 12:09:12 pm »
I am trying to use symscanapi.pp this way, but unfortunately no effect :( As if it did not react at all.
I am asking for any hint.

Code: Pascal  [Select][+][-]
  1. var
  2.   handle1:THandle;
  3.   decoderparams:DECODER_PARAMS;
  4.   decoderList:DECODER_LIST;
  5.   res:integer;
  6. begin
  7.  
  8. // this returns the correct result
  9. SCAN_Open('SCN1:',@handle1);
  10. SCAN_Enable(handle1);
  11.  
  12. // this returns the ERROR result
  13. res:=SCAN_GetDecoderParams(handle1,DECODER_I2OF5,@DecoderParams);
  14. ShowMessage(inttostr(res));
  15. decoderparams.dwMinLength:=1;
  16. decoderparams.dwMaxLength:=40;
  17. res:=SCAN_SetDecoderParams(handle1,DECODER_I2OF5,@DecoderParams);
  18. ShowMessage(inttostr(res));
  19.  
  20. // this returns the correct result but but does not change the settings
  21. SCAN_GetEnabledDecoders(handle1,@decoderList);
  22. decoderList.Decoders.dwDecoderCount:=1;
  23. decoderList.Decoders.byList[0]:=57;
  24. SCAN_SetEnabledDecoders(handle1,@decoderList);
  25.  
  26. // this returns the correct result
  27. SCAN_Disable(handle1);
  28. SCAN_Close(handle1);
  29. end;

arnoldb

  • Jr. Member
  • **
  • Posts: 97
Re: Problem with manage scan params in SymScan
« Reply #1 on: May 11, 2022, 07:19:40 pm »
Hi.

It's been many years since I contributed this library, and for more than 10 of those years I've not even worked with / had access to Symbol scanners, so my memory is a bit rusty  ;)

You didn't mention the model of your scanner you're trying to use...

IIRC - the barcode symbologies the scanners can use depend on the models, and sometimes have to be explicitly enabled on the devices through their configurations.
From what I can remember, the Interleaved 2 of 5 (I2OF5) symbology was not enabled by default on the MC9000 (and possible MC5000) range of scanners - it had to be enabled via the device configurations.  This might be the reason you're getting the error, so check to see if your scanner supports I2OF5 and whether it's enabled.

Try and test a Code 39 barcode and see if that works - CODE39 is commonly used on device serial numbers and model numbers and so on, so is a quick way to test.

Unfortunately that's as far as I can help you now.

Kind regards, Arnold

 

TinyPortal © 2005-2018