Page 1 of 1

Read/Write to (com)ports ?

Posted: Wed Nov 09, 2011 9:52 pm
by FluoMarker
Hi,

I use FNXeditor 2011.
Altough in the helpfile I didn`t find the commands INP and OUT, I found them in the FnxBasic Language Reference (file: FnxBasicRef.pdf).
Unfortunately, when used I get the error message `error 8 "INP` not declared/unknown" ...
How can I read/write to a (com)port ?

thanks

Read/Write to (com)ports ?

Posted: Fri Nov 11, 2011 4:42 pm
by Marco
Hi,
you don`t see the inp out function because microsoft block them for security reasons. There are dll wich are not blocked by microsoft to use the inp out function as a dll call so you can use them to perform an inp or out port function.
best regards marco

Read/Write to (com)ports ?

Posted: Fri Nov 11, 2011 10:02 pm
by FluoMarker
Thanks for your reply, marco.
This is really new to me, can you help me how to do this, where to find info about these dll, and where to possibly find examples ?
I hope it`s feasible after all ?
(I use Win XP Pro version 2002 SP 3)
regards

Read/Write to (com)ports ?

Posted: Sat Nov 12, 2011 4:44 pm
by Marco
There is a file called inpout32.dll with some examples. you can google it. I tried it on xp but it don`t work either. It must be working so i had to figer out why? It is a work around for the inp out instruction.
I will notify you if i found a solution. Someone tried it? (general question)
best regards

Read/Write to (com)ports ?

Posted: Sat Dec 31, 2011 10:36 am
by Giovanni Di Maria
Hi
To connect to COM2, and write to it, I use:


dim PortaSeriale as filestream
PortaSeriale.open("com2:")
PortaSeriale.write("B")
PortaSeriale.close

Can I set its parameters to: COM2, 9600, 8,N,1 ?

Thank you
Giovanni