Author Topic: LPT comp no longer works after upgrade to 9.19?  (Read 3798 times)

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
LPT comp no longer works after upgrade to 9.19?
« on: June 30, 2011, 12:50:59 pm »
Hi,

I'm hoping you can help me with a problem with the 9.19 release (trial) after upgrading from the 8.22 version (Pro).

I'm using the TnrLPT component to send data to a thermal printer and this works perfectly in the 8.22 release.
I have found some issues when running on a x64 windows install so I have installed the 9.19 trial release to see if this
resolves the problem.

I am finding that if I use the 9.19 release on my 32bit Win7 machine, I can no longer print to the printer (no errors and no printed output).
I can switch the components back to the 8.22 release and everything works again.

I need x64 support so I need the 9.19 release but is just doesnt seem to work?

Do you have any suggestions of what to try or what may have changed between 8.22 and 9.19?

Thanks,

Chris Hedges
Tickets.com UK

D2007, NrCommLib 8.22 -> 9.19

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #1 on: July 01, 2011, 09:25:12 am »
Hello

Thank you for your interest in our product.

We need more details about your problem.

Did you try LPTDemo from latest release of nrComm Lib with your device?
Does it work correctly?
Do you see any exceptions?
Do you use administration account for run application?

Possible your system need small cleanup of 8.xx version.
You can try to delete following registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\nrusb
reboot PC and try again.

We tested LPT solution on x64 Win7. All works fine.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #2 on: July 01, 2011, 10:42:21 am »
Hi Roman,

I've managed to get 9.19 to work in Win 32bit now, so some progress!

Unfortunately when I try the same test on a Win 7 64bit machine I get the following error

"LPT1 Open is Failed - The system cannot find the file specified"

The 64bit machine is using the same printer and the base address of the port is the same as the 32bit machine.
I've checked the 64bit machines registry for the key you mentioned but it doesn't exist.

Running as administrator does not help either

The code I am using is very simple, see below.

      fLPT1.LptPortNo := 1;
      fLPT1.LptIOBase := StrToInt('$' + edtPortBaseAddr.Text);
      fLPT1.Active := True;
      fLPT1.SendString(Ticket);

Any suggestions?

Thanks,

Chris.

« Last Edit: July 01, 2011, 10:44:30 am by chedges »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #3 on: July 01, 2011, 10:58:11 am »
Hello

Possible TnrLpt can not find LPT port on x64 pc.

Please download compiled LPTDemo from our site and run it on your x64 test machine.

Does it show correct list of LPT ports?
Try to click open needed port. Does it show same exception?
Please try to find LOG file after LPTDemo test and upload it here.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #4 on: July 01, 2011, 11:07:40 am »
Hi Again,

I've tested the LPTDemo on the 64bit machine and it appears to work ok, no errors were displayed and I was able to activate the port.

Does the LPT demo use a different control to the TnrLPT?

[01/07/2011 12:03:08] nrComm Lib v9.17 Pro  (TRIAL! Please register!) Windows 7 [6.1.7601] Service Pack 1
[01/07/2011 12:03:08] TnrLptDriver Open()
[01/07/2011 12:03:08] TnrLptDriver CreateService ...
[01/07/2011 12:03:09] TnrLptDriver WOW64 mode ...
[01/07/2011 12:03:09] TnrLptDriver x64 stub finished. Error Code : 00000000
[01/07/2011 12:03:09] TnrLptDriver StartService ...
[01/07/2011 12:03:09] TnrLPTDirect mode. Base address: 378

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #5 on: July 01, 2011, 11:33:22 am »
Hello

You can take a look at LPTDemo sources in Demos folder of nrComm Lic home directory on your hard drive.
You can modify its sources and add code with string output and test again.

Also you can check that nrLpt1.DirectMode := true;

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #6 on: July 05, 2011, 12:53:40 pm »
Hi Roman,

I'm still having issues with printing when using the 9.19 build. I've previously tried your LPT demo on the 64bit machine and that seems to activate the port ok.

I've now tried send some data to the LPT port using my appication rebuilt with 9.19 and it cannot print :( I have ensured the the nrLPT.DirectMode = True
but I cannot get it to work. I do not get any errors raised on my 32bit Win7 machine. If I recompile again with 8.22, it works fine and the printer can print successfully.

As far as I can tell, the LPT port pins are being set differently by the two different versions. I have a small routine to check the LPT pins and to determine if a LPT cable is attached

e.g

 function TForm1.LPTDeviceDisconnected : Boolean;
begin
 Result := False;

  with fLPT1 do
  begin
    if (not(Pins[pnSelect]) and   //13
        not(Pins[pnNoPaper]) and  //12
            Pins[pnBusy] and      //11
        not(Pins[pnNACK]){ and     //10
            Pins[pnError]} ) then  //15
    begin
    //No Power
      Result := True;
      WriteLog('No Power');
    end
    else
    if (    Pins[pnSelect] and   //13
            Pins[pnNoPaper] and  //12
        not (Pins[pnBusy]) and   //11
            Pins[pnNACK] and     //10
            Pins[pnError]) then  //15
    begin
      //No Cable
      Result := True;
      WriteLog('No Cable');
    end;
  end;

  if Result then
    WriteLog('LPT Printer is disconnected!')
  else
    WriteLog('LPT Printer is connected!');
end;


In 8.22, the above code will correctly indicate that the cable is connected and the printer will print. Switching over to 9.19, the code always reports the cable as disconnected (regardless if the cable is attached or not) and the printer does not print when I send data to it using the LPT.SendString command.

Is there anything I can provide you with that will assist in resolving this issue? I need to get this resolved before I can concentrate on the x64 issues and purchase the 9.19 upgrade.

Many thanks,

Chris.
« Last Edit: July 05, 2011, 12:56:45 pm by chedges »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #7 on: July 06, 2011, 04:01:49 am »
Hello

Please run LPTDemo, open port and click <Refresh>.
Does demo show correct states of pins?

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #8 on: July 06, 2011, 12:52:30 pm »
Hi Roman,

I've performed the test using the pre-compiled version of the LPTDemo I downloaded from your site and a version compiled using 8.22

The image on the left is the 8.22 version. The test was using the same machine and the same printer. you can see the pins are
different between the two versions (Pins 11 and 12 are different)

Any reason why this should be?





Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #9 on: July 08, 2011, 05:45:17 am »
Hello

Thank you for information.

Please try new version of LPTDemo from attachment.

Roman Novgorodov
DeepSoftware LLC
« Last Edit: July 08, 2011, 05:47:46 am by Roman Novgorodov »
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #10 on: July 08, 2011, 08:44:35 am »
Hi Roman,

It's getting there! I can now print successfully using your new excutable on my 32bit Win7 machine! :)
Unfortunately, it does not work on my 64bit machine :(

Here is a screenshot and the log from the 64bit machine. I get no errors, just nothing happens.






[08/07/2011 09:39:11] nrComm Lib v9.20 Pro  (TRIAL! Please register!) Windows 7 [6.1.7601] Service Pack 1
[08/07/2011 09:39:11] TnrLptDriver Open()
[08/07/2011 09:39:11] TnrLptDriver CreateService ...
[08/07/2011 09:39:11] TnrLptDriver WOW64 mode ...
[08/07/2011 09:39:12] TnrLptDriver x64 stub finished. Error Code : 00000000
[08/07/2011 09:39:12] TnrLptDriver StartService ...
[08/07/2011 09:39:12] TnrLPTDirect mode. Base address: 378
[08/07/2011 09:39:22] TnrLPTTry to send string hello<p> ...

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #11 on: July 08, 2011, 11:23:15 am »
Hello

Thank you for quick feedback.

We tested with x64.  Demo changes and gets LPT pins correctly.

Please try new one from attachment. Click new button "Send string2"

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #12 on: July 08, 2011, 12:39:10 pm »
Hi Roman,


Good news, the new button seems to work both on 32 and 64bit versions :)

Can you make available a full nrComm trial version available so I can test it within my code?

Thanks so much for your time and assistance!

Chris.

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #13 on: July 11, 2011, 11:51:14 am »
Hello

nrComm Lib v9.20 trial is available in ZIP file on main product page.

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

chedges

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Re: LPT comp no longer works after upgrade to 9.19?
« Reply #14 on: July 13, 2011, 11:24:43 am »
Hi Roman,

The version seems to work ok.

I've now purchased the pro version of nrComm but the Share-it! link that got emailed to me only has the 9.19 release.

Can you make the full 9.20 version available?  I can send you any licence information that you may need

Thanks,

Christaan Hedges
Tickets.com Ltd
« Last Edit: July 13, 2011, 11:33:33 am by chedges »