1. Comm.Question
- Posted by Kondor Attila <konel at DPG.HU> Mar 01, 2000
- 452 views
--I 'd like to use COM ports in euphoria (W32). If I do: hCom=open("COM1","wb") hCom=-1 --when I did: xCreateFile= linkFunc(kernel32,"CreateFileA",{C_POINTER, C_LONG, C_LONG, C_POINTER, C_LONG, C_LONG, C_LONG },C_INT) NULL}) printf(1,"\nhCom=%d",hCom) --hCom=12 -- GetCommState, BuildCommDCB, SetCommState works with hCom --and puts(hCom,"something") -- then the message "file number 12 is not open" Please help me! Thanks, Attila Kondor
2. Re: Comm.Question
- Posted by Jeffrey Fielding <JJProg at CYBERBURY.NET> Mar 01, 2000
- 438 views
Windows file handles, as far as I know, are not compatible with Euphoria's file numbers. You need to use the Windows API to read and write using Windows file handles. Also, check out serial.e. I haven't tried using it under exw, but it might work. Jeff Fielding ----- Original Message ----- From: "Kondor Attila" <konel at DPG.HU> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, March 01, 2000 9:44 AM Subject: Comm.Question > --I 'd like to use COM ports in euphoria (W32). If I do: > hCom=open("COM1","wb") > hCom=-1 > --when I did: > xCreateFile= linkFunc(kernel32,"CreateFileA",{C_POINTER, C_LONG, C_LONG, > C_POINTER, C_LONG, C_LONG, C_LONG },C_INT) > > hCom=c_func(xCreateFile,{comst,GENERIC_WRITE,0,NULL,CREATE_NEW,0, > NULL}) > printf(1,"\nhCom=%d",hCom) > --hCom=12 > -- GetCommState, BuildCommDCB, SetCommState works with hCom > --and > puts(hCom,"something") > -- then the message "file number 12 is not open" > > Please help me! > Thanks, Attila Kondor >
3. Re: Comm.Question
- Posted by M King <boot_me at GEOCITIES.COM> Mar 01, 2000
- 451 views
>> --I 'd like to use COM ports in euphoria (W32). If I do: There is a parallel port library that I put together a wrapper for (by looking at what everyone else was doing) that i beleive can also acess serial ports. You might check it out... http://www.rapideuphoria.com/euio.zip Monty in Oregon
4. Re: Comm.Question
- Posted by Kat <gertie at ZEBRA.NET> Mar 02, 2000
- 429 views
----- Original Message ----- From: "M King" <boot_me at GEOCITIES.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, March 01, 2000 6:09 PM Subject: Re: Comm.Question > >> --I 'd like to use COM ports in euphoria (W32). If I do: > > There is a parallel port library that I put together a wrapper for (by > looking at what everyone else was doing) that i beleive can also acess > serial ports. You might check it out... > > http://www.rapideuphoria.com/euio.zip > > Monty in Oregon Hi Monty in Oregon, How do we configure the port for the different modes? ECC, EPP, etc? How do we tristate the port? How do we know if it's configured for 8out/4in and change it to 8out/8in? How do we know if the ClkIn has been toggled? Kat
5. Re: Comm.Question
- Posted by M King <boot_me at GEOCITIES.COM> Mar 02, 2000
- 468 views
Hi Kat, Good questions. I really don't know. I just hacked together the wrapper, watched the little lights blink on the PP monitor, and forgot about it. I was hoping someone somewhere someday might be able to use it. I didn't create the .dll, but was hoping some day to maybe use it to control a simple robot from a windows library using high low sigs, etc. I just mentioned this because I remembered that although it was intended for PP's I thought they mentioned serial as well. Sorry to be so unsupported or un-informative, but I am not the greatest programmer in the world...I just like to play. (if it gets too complicated I look at it and try to absorb it through osmosis, and go to the next) Love some of the stuff you do though ! Monty >How do we configure the port for the different modes? ECC, EPP, etc? How do >we tristate the port? How do we know if it's configured for 8out/4in and >change it to 8out/8in? How do we know if the ClkIn has been toggled?