Introduction: Re-Engineering a Serial Based Device
Reengeneering a Serial interface
Targed for reengeneering Fluke 6500 I will do this becouse the Fluke original software is very "user unfriendly, not intuitive" or how my co-worker says "f*d up". Lets start the mystery.
Step 1: Step 1: Research
My Device is Fluke 6500-2 Portable Appliance Tester.
Searching for information about the device and the company.
Often the devices are only Labeld by another company. Then we have to some more investigating. This seems to be a original.
The Appliance Tester hardware is different in some countries because plugs are diffenent.
There are at least 2 versions, first with and one without a keyboard. The newest version is build with an USB-Port but I think the send data still the same.
For our device we will find not very much. Only price, shops, original software, informations about mesurement and manuals. sadly I found nothing important about the serial interface. Only for other devices but the interfaces are very differend. An I find the settings for the Com-Ports.
Step 2: Step 2: Connect the Tester to PC.
The device interface is female and my wire is male, so I need a GenderChanger for the RS232.
My PC have no RS32 so I need a adapter to USB (around 10€). The USB adapter need a Driver for Windows.
Once installed we try to see if hardware is ok. We open device manager in Windows.
Here we should see interface (COM & LPT) (I'm not sure if this is rigth in english Version, I only have a german) if we plug in our device there have to pop up one new point. For me it calls: "Prolific USB-to-Serial Comm Port (COM4)" the Com number is not fix and change if you use another USB-Port or something else.
Step 3: Step 3: Install a Terminal Software.
Here is a freeware Terminal:
http://circuitdesolator.blogspot.com/2010/12/termi... thank you very much for this br@y.
Settings schould be standard (and i found a verification online), or at least nothing unusual
COM-Port: 4 (see device manager)
Databits: 8 Parity: No parity or n
Flow control: None Stopbits: 1
Click at Connect Button. Now we listening to the Com-Port.
At the Application Tester we have to start the communikation via:
"PC/Druck" (or PC/Print)
"Start" pre chosed Data -> PC
"Start" pre chosed all data (all records)
"Start" pre chosed (last Format) i use FLUKE DMS
Now we see that the device is sending something.
The Terminal have to show something. (see Pictures)
To possible Formats:
the device can send .csv, .FLK, .PRN.
in fact .FLK is only a text file,
in .csv mode i miss information, so i dont use it
the .prn is only a print file for direkt printing.
Step 4: Step 4: Analyse
Read data (see DMS.FLK), I stored all auto test modes:
If I save data to the CF-Card on device and read it at my PC, i got the exactly same result.
The format looks very, very old scool. A type of pint format for bon printer or something like that.
Every device i tested was fine. so we have to do another run to see what changes if somethinges bad. At the first try i numbert the devices execdly like the auto mode.
what else, lets look at the first lines
MODEL 6500-02 15 chars, pretty clear, my model number
SN 1801234 18 chars, my device serialnumber
one empty line
TEST NUMBER 1 18 chars, the first testrun i stored, this is a counter
DATE 25-AUG-06 18 chars, the date i tested the device, i did not set the clock so i is not right, because the device lost sometimes the clock and reseting is user unfriendly i ignore this line at the moment
APP NO 145 18 chars, the device number I typed in, i can set 2-3 other things by storing linke department or comment, but if i have to type this 40 times i go crazy, so i fill only this line in real world
TEST MODE 145 AUTO 18 chars, the test mode i used
SITE 18 chars, no idea
SITE1 18 chars, still no idea
SITE2 18 chars, realy i have no idea
USER 18 chars, an this also, i have no idea
VISUAL CHECK P 18 chars, the first mesurement at every testrun is to look if the decice is OK. P is for Positive i think
BOND RANGE 200mA 18 chars, mesurement 1 this is range of the mesurement there are a few possible ranges (see device manual)
EARTH 0.28 OHM P 18 chars, mesurement 1 this is result of the mesurement
LIMIT 0.30 OHM 18 chars, mesurement 1 this is limit of the mesurement INS 1 >299.9 MEG P 18 chars, mesurement 2 this is result
LIMIT 1.0 MEG 18 chars, mesurement 2 this is limit
PN CONTINUITY P 18 chars, mesurement 3 this is result
LOAD 160 VA P 18 chars, mesurement 4 this is result LIMIT 3700 VA 18 chars, mesurement 4 this is limit CURRENT 0.6 A P 18 chars, mesurement 5 this is result LIMIT 16.0 A 18 chars, mesurement 5 this is limit LKGE 0.03 mA P 18 chars, mesurement 6 this is result LIMIT 3.50 mA 18 chars, mesurement 6 this is limit and again one empty line
reapeat simmlar Format for other recordings.
END OF DATA 11 chars, very clear
Step 5: Step 5: Time to Puzzle
See, Check, Test
What I do till now is almost the same waht I have to do in Fluke DMS. This is irritating, because all other Testers read by PC so no one have to press buttons there. And in any case I do it everytime and waiting but nothing happen.
Lets see if we can do it better than Fluke. Manipulate communikation.
I think this is possible because the developer who build this needed a way to programm and debug.
I never done something before and show what i try and how i work.
1. Tryed random like 1, aaa
shows that the device is reciving something by "1" it makes a beep,
by "aaa" it makes 3 beeps. Yay this is a goog sing. This is telling me if i write comands like "wakeup", "listen", "start" it would not work because every char is send as one sepperate command.
Whats next. Time to ask duckduck.
After reading I found commands used by telecommunication called ATcommands but no luck, nothing happen.
Next thing I found ASCII codes in Br@y's Terminal i have to write them with a # in front of the ASCII comand I will write. So I try #001 and WOW something happen at the tester now it shows the RPE-Check(200mA).
I want more of this, I found a ASCII Table
I set up a table and try every command and look what happen and go back to main sceen. This will take some time.
Some keys missing so next text run in a screen were I see more.
The result you can see in tables1-3.
code for terminal ;Zeichen;button;
#8;BS^H;Leitungs Test;Wire test
Result: We have to send Char 18 for PC/Print and 3 times Char 12 for Start, to start the send funktion.
Step 6: Step 6: Read File to Excel
The project is growing to fast and to big. I will make a break here.
Reading this with Excel is a very big puzzle. I can´t write everything here. This is a project for opensouce and I am serching for software engeneers who helping through this.
But, one last part, I want to show. Reading files with Excel.
Aktivate "developer tools" in Excel.
go to Visualbasic editor.
insert this in Module or Worksheet:
Instructable editor is not good for code, so I attach the code as VBAcode.txt
I add the DMS.FLK too. That I get from the CF card of my Application Tester.
You also can read the data you copy out of the Terminal and save as .txt.
Now I start the big Puzzles:
- get data with excel direct form Tester
- move values to readable documents
- save data to database
- export to word
Thanks and greetings to FAU/IAA, linksunten.indymedia, FLUKE, www.herber.de/forum and many more.