[Implemented] Serial port commands

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Klonk
Enthusiast
Enthusiast
Posts: 173
Joined: Tue Jul 13, 2004 2:17 pm

Post by Klonk »

Anotehr vote for possibility to access COM-ports
Bye Karl
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

MVCom works well for me. I made a routine to search for an active port over the range COM0 to COM9 then interrogated each working port for my hardware's signature. No problems... but I seem to remember ports numbered above 9 could not be used... grey cell failure for details... getting old :wink:

Customers never know what ports they have and USB converters seem to make up their own numbers so a port search was a good idea.
kwag
User
User
Posts: 35
Joined: Thu Jul 17, 2003 10:03 pm
Contact:

Post by kwag »

Dano wrote:One more vote here for native com port I/O support .
I second that too :!:

-Karl
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

Though I'm new to PB... I'm tossing in my vote for innate support in PB for COM port functions (procedures) :!:
Intrigued - Registered PureBasic, lifetime updates user
Klonk
Enthusiast
Enthusiast
Posts: 173
Joined: Tue Jul 13, 2004 2:17 pm

Post by Klonk »

In the meantime we coudl work with the MVCOM library (with windows)
Bye Karl
mlwhitt
User
User
Posts: 67
Joined: Sat Jun 11, 2005 3:38 am
Location: Western Kentucky
Contact:

Post by mlwhitt »

yeah I could use Com port / serial port routines and commands for various controllers that I want to talk to.
Intrigued wrote:Though I'm new to PB... I'm tossing in my vote for innate support in PB for COM port functions (procedures) :!:
PB and PureVision XP Registered.
www.michaelwhitt.com
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

i'm agree. RS programming is still alive...
in my work, i need to drive some 'RS232' hardware like POS ( Point Of Sale system, Bank Card Reader, Cheque Printer ).
So i would be pleased to have a set of commands. :roll:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
BinoX
User
User
Posts: 46
Joined: Mon Jan 31, 2005 11:57 am

Post by BinoX »

That'd be really useful for me too. I've wanted to write a hydraulics control system that works under windows xp. (My old one is DOS based and just doesn't want to run... plus I've lost the source code.. heh)
mlwhitt
User
User
Posts: 67
Joined: Sat Jun 11, 2005 3:38 am
Location: Western Kentucky
Contact:

Post by mlwhitt »

I've got to try the MVCom library, but I would love to see builtin serial support in 4.0. That would be totally awesome.
PB and PureVision XP Registered.
www.michaelwhitt.com
KlausS
New User
New User
Posts: 1
Joined: Mon Oct 13, 2003 2:20 pm

Post by KlausS »

Here is the next vote for native COM commands. :P

I work for a company that develops medical equipment. Mostly all of this equipment uses RS232 connections for programming, updating, configuration, service and other things.
The reason is that the RS232 interface is easy to use, well known, robust, secure and allows for longer cables. In addition this interface is supported by neary all microcontrollers.
No other protocol can be monitored as easy as the RS232 protocol just by using any or your favourit terminal program! :!:
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

There is another protocol much more professional and with more capabilities for distances between equipments, and others.
I'm talking about RS422.
It sounds wierd to me the use of RS232 for that instead RS422 or another different intefaced systems using USB, optical, parallel-fiberchannel, firewire... :o
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
woki
User
User
Posts: 23
Joined: Fri Apr 25, 2003 4:48 pm
Location: Germany

Post by woki »

I also vote for nativ COM commands and nativ USB handling.

Neither RS232 nor RS422 are protocols I think, they only describe the physical layer. It's up to the user to define his protocol. RS232 is as professional as RS422. Indeed RS422 more insensible to electric distortion and the better choice for long distances.

The MVCom library is fine, but only for windows. So nativ support would be a graete enhancement.
User avatar
SimpleMind
Enthusiast
Enthusiast
Posts: 112
Joined: Sun May 18, 2003 12:40 pm
Location: Netherlands

Post by SimpleMind »

You can use serial communication commands from the WIN32API in PureBasic. It's as native as can be. The only thing you have to do is reading, thinking and coding. Think Forth!
Give me books, fruit, french wine, fine weather and a little music.
John Keats
woki
User
User
Posts: 23
Joined: Fri Apr 25, 2003 4:48 pm
Location: Germany

Post by woki »

You can use serial communication commands from the WIN32API in PureBasic. It's as native as can be. The only thing you have to do is reading, thinking and coding. Think Forth!
That's what I do.
Nativ to PB and cross platform, I mean.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

suposeably you can Write with this piece of assembly
p is the port address and n is the number to send out

Code: Select all

MOV DX,p
MOV AL,n
OUT DX,AL 
althought it crashes here, im not sure why

not sure what input is thought
~Dreglor
Post Reply