It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Help getting started . . .

Moderator: dafunkymunky

Help getting started . . .

Postby wayneknazek on Wed Feb 15, 2006 4:32 pm

Hello all. :)

First of all, I'm not here just to get you to do my work! LOL I'm looking for a realistic approach to getting started.

I apologize for the length of this post, but I feel giving you the background will eliminate my needing to bug you all the time for more answers. :)

I have a problem to resolve at work. I program an automated machine (in mnanufacturing Quality Control, called a CMM) that measures parts. Theie software output function (data, measurement results, etc.) has limited options . . .

1). I can output a .res file. (basically, a text report I can open in Word, Notepad, etc. The software automatically creates a .res, and populates it after the "endmeas" line. (last line in program)

2). I can create a csv file. As above, the data populates the file AFTER the program finishes running.

Problem . . . WAY too time consuming getting the data into a pre-formatted Excel spreadsheet. Too much time needed to clean up the spreadsheet after data dumps into it. Extra blank rows, headings, test, etc. not needed)

This is going to be used for production. So the machine will be checking parts all day long. It takes longer to do the spreadsheet than run the parts. UGGHHHH!

All I want is the data, in columns. Without all the extra text, and without all the extra rows between each output feature, etc.

I need to do this as automated as possible because the production personnel are not highly computer literate, and because of the time involved.

I've done this with no problem with other software. Just started working here. And the software that runs this machine specifically does not allow any type of interface, as in . . . pulling the data out while the program is still running. (I confirmed this with the software manufacturer)

So, I need to open a .res or csv . . . and pull the data into Excell in a specific format, free from extra blank rows, etc. Just the data, not the headings, etc.

I wrote a macro in Excel VB for one company that had software with no exporting funcions. It opened Excel, pulled the data out, dumped into the rows/columns I specified, and performed the tasks I needed. All while the program was open. The software allowed for inserting BASIC scripts. I just wrote one that opened a specific Excel file. That file did it's thang . . . then the CMM program closed.

Unfortunately, the way this software works is . . .

It creates the .res & the csv file when the program starts running. BUT . . . it doesn't populate those files until AFTER the program finishes, and closes.

I was able to write a script from within their software that opens a specific Excel file. But as soon as the Excel file opens, the CMM porogram is dead. Will not run.

If I close the Excel file, the program begins again. UGGHHHHHHH!

The CMM software company said that's the way it is. Nothing I can do about it. :(

So . . . that being said . . . where do I go to get some VB/EXCEL starting tips about . . .

formatting the data from a csv . . . or pulling data out of a .res, into a formatted spreadsheet.

Ideally . . . the CMM would finish running the program. Then automatically, an Excel file would open, with the data from the generated .res, or csv.

The file name of the csv and/or .res would always be the same. it's the name of the CMM program. So I could create an Excel file each time I write a new CMM program, so the file name for that Excel file would always be the same.

Make sense? :)

UGGHHHH!

Wayne
wayneknazek
 
Posts: 0
Joined: Wed Feb 15, 2006 3:51 pm
Location: Cleveland, Ohio

Who is online

Users browsing this forum: No registered users and 5 guests