The Windows Standard Serial Communications Library for Visual Basic. (Visual Basic for Applications) such as Excel. ' open port COM1.
Most electronic scales and laboratory balances have an RS232 (Serial) or a USB port however no instructions are normally provided to show you how to correctly connect it to your PC or how to input weight values directly into programs like Excel or Access. The steps below will show you how to connect your scale to a PC and identify what port the scale is connected to and also how to input weight readings directly into Microsoft Excel.
The only things that you will need are an appropriate cable that connects from the scale to your PC and a Windows program called a 'Software Wedge'. In this example, we will use a product called BC-Wedge from TAL Technologies, Inc..
Note: This tutorial assumes that your scale or balance has a 'Print' button that will transmit weight values to a PC. Most scales and balances do have one although it may not be marked clearly. You may need to read the users manual for the scale or contact its manufacturer to learn exactly how it works. If your scale does not have a Print button, it does not necessarily mean that you cannot send weight data to a PC. It means that you probably need a more advanced software wedge like the WinWedge product from TAL Technologies.
The only things that you will need are an appropriate cable that connects from the scale to your PC and a Windows program called a 'Software Wedge'. In this example, we will use a product called BC-Wedge from TAL Technologies, Inc..
Note: This tutorial assumes that your scale or balance has a 'Print' button that will transmit weight values to a PC. Most scales and balances do have one although it may not be marked clearly. You may need to read the users manual for the scale or contact its manufacturer to learn exactly how it works. If your scale does not have a Print button, it does not necessarily mean that you cannot send weight data to a PC. It means that you probably need a more advanced software wedge like the WinWedge product from TAL Technologies.
I'm having trouble getting code to read the incoming data send by a torque reader I'm working with. It sends a RS232 data stream which our current wedgelink software can be set up to translate it into key presses and then exported to excel. I would like to get the data into a string then cut the string up into an array of arrays to be able to use the data directly with excel. There is a ton of stuff how to do it in other languages but I'm limited to VBA right now.
This link https://dl.dropboxusercontent.com/u/...77/modCOMM.bas has the base code someone wrote where i can open and close the port but im not getting any data or able to hold it open until end of the data feed. I'm still new at this and know I'm missing something.
Serial Port Communication in Excel (VBA) | Electronics Open Source was the first place i found this code. Any ideas?