×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Simple Flexport/Chicago Dial Indicator Data Acquisition Program

Simple Flexport/Chicago Dial Indicator Data Acquisition Program

Simple Flexport/Chicago Dial Indicator Data Acquisition Program

(OP)
I authored this simple code to fill the void for running data acquisition for linear length measurements using the

flexport.  Note you'll need to have the flexport connected to either COM1 or COM2 (or you'll have to change your COM

designations to either 1 or 2) for the qbasic compiler to communicate with the Flexport.  I'm sure the code could be

improved upon (i.e. the inclusion of graphics, etc.), but my goal was to send data to a text file to export into a

speadsheet program for graphing and analysis. I sincerely hope this helps someone else out there.

CLS
PRINT "FLEXPORT DATA ACQUISITION PROGRAM FOR USE WITH CHICAGO DIAL GUAGE INDICATOR"
INPUT "FILENAME (NAME.TXT)"; FILENAME$
INPUT "NUMBER OF SAMPLES"; SAMPLE
INPUT "SAMPLE RATE (SECONDS)"; RATE
OPEN "COM1:9600,n,8,1,CS,DS,RS" FOR RANDOM AS #1
OPEN FILENAME$ FOR OUTPUT AS #2
FOR Y = 1 TO SAMPLE
FOR X = 1 TO 3
WRITE #1, "!@R01"    '
WRITE #1, "R01<CR>"    'COMMANDS TO THE FLEXPORT TO TAKE READING
WRITE #1, "R<CR>"    '
NEXT X
INPUT #1, COUNT, READING, MODE$, ID, CR, LF
PRINT Y,DATE$, TIME$, READING, MODE$
PRINT #2, Y,DATE$, TIME$, READING, MODE$
CLOSE #1
LET SRATE=RATE*3600    'RATE IN SECONDS [WILL BE A FUNCTION OF CPU CLOCK SPEED TO CONVERT APPROPRIATE LENGTH TO

SECONDS OR MINUTES OR HOURS...]
            ' - CHANGE SAMPLE RATE INPUT TEXT ACCORDINGLY
FOR DELAY = 1 TO SRATE
NEXT DELAY
NEXT Y
END

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close