Read/Write to (com)ports ?

In this category you can exchange your programming questions and solutions.
Post Reply
FluoMarker
Posts: 2
Joined: Wed Nov 09, 2011 9:30 pm

Read/Write to (com)ports ?

Post: # 771Post FluoMarker
Wed Nov 09, 2011 9:52 pm

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

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

Read/Write to (com)ports ?

Post: # 772Post Marco
Fri Nov 11, 2011 4:42 pm

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

FluoMarker
Posts: 2
Joined: Wed Nov 09, 2011 9:30 pm

Read/Write to (com)ports ?

Post: # 773Post FluoMarker
Fri Nov 11, 2011 10:02 pm

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

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

Read/Write to (com)ports ?

Post: # 774Post Marco
Sat Nov 12, 2011 4:44 pm

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

Giovanni Di Maria
Posts: 8
Joined: Tue Feb 01, 2011 8:57 pm

Read/Write to (com)ports ?

Post: # 775Post Giovanni Di Maria
Sat Dec 31, 2011 10:36 am

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

Post Reply