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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPW26 to serial port

Status
Not open for further replies.

tondi

Technical User
Nov 29, 2001
115
US
User is running FPW26 app on Win98 OS with a cash drawer attached to com1. FPW26 seems to do something strange to the comm port.

I am using the appropriate mode settings, etc. and it will work fine from dos prompt or from FPD26 version of the same application. When I run the FPW26 version of the same app, all else remains same, it will work once only. After exiting the FPW version and test the port, we get an error and the port is not recognized until I reboot the computer.

I know this would be an issue with Win2k and XP but should work with Win98, right?

Thanks
 
No. You will have the same issue with any version of FPW. The OS takes control of the com ports. MODE is basically ignored.
What you will need is a third party comm library like comm tools or something to be able to talk to the serial ports.
Try here: Dave S.
[cheers]
 
Thanks Dave for your response(s) to my question(s).
Yes, I have taken the FPD26 app to FPW26 for compatibility and psychological purposes and FPW26 was the course of least resistance :)

I knew that Win2k and WinXP take control of ports but did not think Win9x did so since I can access ports directly on Win9x OS from DOS command and from FPD26 app. It sounds more like FPW26 is the culprit, doesn't it?

There are many, many Windows programs on the market, POS and otherwise, that access multiple ports, as I am attempting to do, on Win2K as well as WinXP OSs so there must be a solution out there somewhere.

Surely someone on this board has addressed this challenge and come up with a solution. I have searched the threads but found nothing.

Thanks again,

Tony
 
Tony,
As Dave suggests, all Windows OS's lay claim to maintaining control of the (comm) ports - even back in Win 3.x. And while it's true that the Windows based on DOS are sometimes more "forgiving" about apps directly addressing the ports, it's still NOT a good idea.

If you were using VFP, then it's fairly easy to do simple things using the MSCOMM32.OCX control. With FPW, you'll need a 3rd party tool that can directly access the WinAPI to reliably talk to the COM ports.

Rick
 
Rick,

Do your comments apply to LPT2 and LPT3 also?
If so, can you recommend 3rd party program to deal with these scenarios.

Thanks,

Tony
 
Tony
The code I used in thread 182-90957 works fine now, The problems I had were traced to Norton Anti Virus Software.
Might be worth a try.
Andrew
 
Can't you just set the printer to com port, print the code to open the drawer, and then set the printer back to LPT1?
And watch out for spooling. Your drawer can open several seconds after you actualy ask it to.
Ken F
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top