Re: [SLUG] Industrial Linux

From: Ed Centanni (ecentan1@tampabay.rr.com)
Date: Sun Apr 15 2001 - 12:46:44 EDT


Two possibilities come to mind:

Since you're already familiar with Basic then bwBasic *may* be of use.
I'm not sure if it's "open" command can be used with serial ports and
it's licensing is not free for commmercial use.
http://www.bwbasic.com/ There's QB2C, a QuickBasic to C translator
http://faust.irb.hr/~stipy/qb2c/qb2c.html. There's QuickBasic for Linux
http://www.xbasic.com/ but it's a bit pricey at $395. There may be some
other basics for Linux.

Another approach would be to use Tcl(pronounced "tickle"). It's "open"
command does support serial port access and it reputedly has a shallow
learning curve. It's licensing has recently been made open source and
is ok for commercial use with the usual caveats.
http://dev.scriptics.com

Quote from this page
http://dev.scriptics.com/software/tcltk/relnotes/tcl8.0a2.txt

"1/12/97 (new feature) Serial IO channel drivers for Windows and Unix,
available by using Tcl open command to open pseudo-files like "com1:" or
"/dev/ttya". New option to Tcl fconfigure command for serial files:
"-mode baud,parity,data,stop" to specify baud rate, parity, data bits,
and
stop bits. Serial IO is not yet available on Mac."

As for the database part, pg_access -- a MS Access clone for PostgreSQL
-- was written in Tcl-Tk.

I'm quite certain that perl or python could handle serial ports too
along with the database stuff but their learning curve may be a bit
steeper than Tcl.

Ed

Bob File wrote:
>
> I apologise profusely if this ends up being the third time this get sent to
> the list. Reading about sendmail wasn't on the list for today. ;-}
> I am an instrument tech at an industrial site (OJ plant). I have a
> project pending that I would like to use Linux for. I am not sure I can
> pull it off with the skills I have now. We sometimes fill 55 gallon
> drums with orange juice for shipment to a customer. We do this by
> putting the drum on a scale and weighing it as it fills with juice.
> We use a small "computer" to accomplish this. It has 8 digital inputs, 8
> digital outputs and 4 serial ports. It has an embedded interpreter/os in
> it that one writes programs for and they are run in real time. The
> interpreter allows storage of some data in a flat table. I just finished
> rewriting the printing routines to use new bar code printers. I am told
> by management that our barrel filling will be increasing because our
> parent company has bought other OJ facilities and wants to use our site
> to package all barrel orders. Right now the barrel is filled, a ticket
> printed with various information on it to put on the barrel and the same
> information is recorded to a table. At the end of the run another serial
> port is used to print the table. This is the only record of the run
> because the table is cleared before the next run. I think it is time to
> start recording this information to a database on a PC. My current idea
> is to send the barrel data to a PC via serial port, and let the PC
> record the data in a database and then send the data back out another
> serial port to the bar code printer. I am not really a Linux programmer,
> but I think I could probably muddle my way through the database part of
> the setup with one of the interpreted languages available. What I don't
> know or even have a clue about is the serial port part of this project.
> How do I get the data in and back out? Will Perl or Python allow me to
> open a serial port and ship data in and out? I know I can pull this off
> in VB, but would rather avoid it if possible. I will be getting a "hand
> me down" PC for this project from the next plant wide upgrade of PCs, so
> the PC won't be the latest and greatest. Plus there are lots of
> liscencing issues with the Win stuff. I think a Linux box for this
> project would give me more flexibility.
> So am I going to have to learn enough "C" to use the serial port or is
> there another way to do this? I am looking at the Kermit program for
> this, but I am not sure I can do what I want to with it's scripting
> language.
> Any clues tossed my way would be appreciated.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:42:29 EDT