circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 


Published July 2001

FINE TUNING AN EMBEDDED IDEA

Lessons from the Trenches Part 1: The Land of BL2000
by Fred Eady

StartZ-World’s BL2000C Me…Lock and LoadAcquire the Voltage DataTransport and Display the Voltage DataJust the BeginningSources and PDF

TRANSPORT AND DISPLAY THE VOLTAGE DATA

Listings 1 and 3 are fully commented and show how a TCP/IP conversation is established between the remote Z-World BL2000 and the front-end VB application running on the Microsoft Win2k server. The next part of our mission takes the captured data and rubs it into cells of an Excel spreadsheet. This is easily done using Excel macros spiced with a little VB Script.

First, I created a standard Excel spreadsheet and placed some graphic text on the sheet to help clarify the data. I then recorded the Sub bl() part of the macro in Listing 4. Basically, the Sub bl portion of the macro retrieves the ASCII delimited data from the file specified in the macro text. It is instructed to do this every 60 s. The data is brought into the spreadsheet and run against some formulas I placed under each voltage cell. The entire sheet is then saved as index.htm in the root directory of the Win2k web server.

Photo 3—The graphics are courtesy of NetStudio 2000 (now called NetStudio Easy Web Graphics Premium) and a web capture of the BL2000 is from Z-World’s web site. The second row of numbers is the resultant voltages derived by formulas I put into the cells.

 

The data received from the Z-World BL2000 that is placed in the flat file will need to be updated periodically. So, I added some VB script code right above the Sub bl() macro that will not only get the data from the file, but generate a new web page every 2 min. Photo 3 is a shot of the Excel page before the conversion to a web page. To show you the end result, I’ve taken a shot of the actual page being served (see Photo 4).

Photo 4—Putting an Excel spreadsheet on the ’Net is a piece of cake with the new ’2000 edition.

 

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ©Circuit Cellar, the Magazine for Computer Applications. Posted with permission.