[fpc-pascal] New to freepascal and how to translate my delphi program.

2011-04-18 Thread P. vanderWal
I am new to free pascal, but have some experience with delphi. I wrote a 
program to control a milling machine (Elektor Profiler, see elektor.nl/ forum  
program Doit).
The program is written in delphi-7 ( about 25.000 lines in 20 modules) and runs 
on MS-Xp. But as MS changes to much in its os's I want to change to linux as os.
The program uses 2 I/O-ports (serial or usb-serial) and here I have a problem 
in translating my program into free-pascal.
I think the forms and screen layouts present no problem, it will take a lot of 
re-typing but oke.

The serial-port problem is my main worry as the programflow depends heavely on 
the communication with the milling machine.

My question is: where do I find lib's with serial-port or usb-port routines 
which I may use to control the communication-lines (bits) to the milling 
machine.

Thanks in advance,

Piet van der Wal (PE0PWA).___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] How to detect serial/usb-serial ports.

2011-07-27 Thread P. vanderWal
Hello,

In my program I need to present the user with a list of available serial and 
usb-serial ports on the system they are using.
How do I detect in my program these ports?.  (something like GetPortList() in 
Delphi-7???).

One port is used by a milling-machine to receive its position and speed 
commands, the other port is used by a controller for switching the machine 
automaticaly on/off
and start or end of the milling and measure and detect the roughness of the 
surface area of the material to be processed.

Thanks in advance,
  
grtjs Piet___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to detect serial/usb-serial ports.

2011-07-28 Thread P. vanderWal


- Original Message - 
From: "Mark Morgan Lloyd" 

To: 
Sent: Wednesday, July 27, 2011 10:36 PM
Subject: Re: [fpc-pascal] How to detect serial/usb-serial ports.



P.vanderWal wrote:

Debian and Ubuntu

grtjs Piet

- Original Message - From: "Felipe Monteiro de Carvalho" 


To: "FPC-Pascal users discussions" 
Sent: Wednesday, July 27, 2011 10:39 AM
Subject: Re: [fpc-pascal] How to detect serial/usb-serial ports.



For which operating system?


I'd expect (recent versions of) those to only create devices that were 
known to exist. I detect what's available by looking for up to 12 
/dev/ttyS*, 8 /dev/ttyUSB* and 4 /dev/ttyI*, then later checking that they 
can actually be opened (bearing in mind that this might glitch a control 
line).


It's worth noting that a few weeks ago I was updating the standard 
serial.pp unit and noticed that Solaris designated serial ports as 
/dev/ttya and /dev/ttyb.


Windows of course is \COM1, or strictly \\.\COM1 etc.; I note Fabio's test 
but in the past have used the registry to find e.g. named ports simulated 
by an AVR box.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or 
colleagues]

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


I'll use Mark's method of com-port detection in my program under linux and
GetComPorts under Windows. In a few days time I'll let you know the result.
Mark thank for the suggestions.

grtjs Piet 


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] How to use serial or usb-ports in linux

2015-09-06 Thread P. vanderWal
Hello all,

I wrote a program to control a hobby milling machine.(Profiler, see 
Elektor-forum). The programm is written in fpc-pascal and using synaser in the 
windows version for control of the serial port(s).
Now I want to use the program in Debian 8... and or Ubuntu 15... Compiling and 
running the present version gives "no permission" for the serial/usb ports.
Please advise how to get the program running with these ports. (lazarus 1.2.4 
fpc 2.6.4).

Piet, PE0PWA (ham radio call). ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] How to use serial or usb-ports in linux... solved

2015-09-13 Thread P. vanderWal
Sven, Christo, Henry and Mark,

thanks for the advice. It shows me the way to go.
But due to a hardware problem it takes some time to solve and test the program 
again.

Piet de  PE0PWA___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal