Subject: Test of GlassPanel
From: Rotary Engine
Date: 12/13/2011, 9:59 AM
To: AAA Put this in the To box <rotaryeng@earthlink.net>, Rolf.Schroedter@dlr.de


Paul:

  I ordered a USB Data Acquisition board from Digikey to use when testing
  my HomebrewedGlassPanel. I didn't order the programmable
  development/testing board you mentioned, I didn't want to take the time
  to learn the language.  So I just ordered a dumb interface board with 20
  I/O ports, 14 that can be used A/D.

  If I choose to put a custom glass-panel in my project, I think I would
  want the control functionality separated as much as possible from the
  display-system anyway, so I will not worry about ECU functionality for
  now. ...



  R. Berglund

  Send pictures of the board you ordered and the price.
  Did you look at this one?
  http://www.hytekautomation.ca/U120816.aspx?productId=1

  Paul Lamar


No ... I had not looked at that one.  I spent about 15 minutes surfing
the web, came up with a handful of manufacturers/vendors, but most units
were in the several-hundred-dollar range.  The one I ordered was
$49.95 ... a bit out of my price range, but seems to be fairly easy to
connect to; it requires no additional sockets, I will not need to spend
a weeks worth of days and nights learning how to program the thing.
That should be worth $20 to me

This is the unit:
http://search.digikey.com/us/en/products/DLP-IO20/813-1027-ND/2135093

R.Berglund

Wow that is a bargain. I wonder what CPU chip they are using?
The Linux driver is a huge advantage. The USB port works on Linux.
It has my favorite connectors on it as well.

Hytek comes only with a Windows driver.

IMHO the missing link at the moment is how do you access it on Linux.
It appears you need to write a C program to pipe the data to your TCL
program.

  Perhaps a Linux serial terminal program will read
the USB port with high speed serial ASCII data coming in.

Does TCL have a command to read a USB port?

HyTek supplies a windows program that stores the data in a file on the
hard disk in comma delimited form readable by a spread sheet.

Paul Lamar

I should be able to read the above mentioned device in Tcl.  I found the
follow documentation:

http://wiki.tcl.tk/1108

Right now it makes about as much sense to me as an Egyptian hieroglyph,
but I should be able to figure it out.

R.Berglund



# A first quick test if you have a modem

# open com2: for reading and writing
# For UNIX'es use the appropriate devices /dev/xxx
set serial [open com2: r+]

# setup the baud rate, check it for your configuration
fconfigure $serial -mode "9600,n,8,1"

# don't block on read, don't buffer output
fconfigure $serial -blocking 0 -buffering none

# Send some AT-command to your modem
puts -nonewline $serial "AT\r"

# Give your modem some time, then read the answer
after 100
puts "Modem echo: [read $serial]"
....................^^^^



You might check with Rolf and see if he has a procedure for a USB port.
Mention binary data.

Rolf.Schroedter@dlr.de (Rolf Schroedter)

The DLP doc suggest no baud rate is required.

Paul Lamar

-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2011 All world wide rights reserved.