Spreadsheet as realtime viewer?

Thanks, I let our SW guy know. However, Active-X gives me the goose pimples (and nobody really uses IEEE 488 anymore in production...)

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg
Loading thread data ...

Know what you mean, It seems all the links are dead in that URL. I dont have any rs232 devices here so I can t play. But you would need to use the windows API Createfile etc to open the port. Or i've seen some references to OpenComm (readcomm, writecomm...) in VB that does the same thing. Actually if it is USB then you might need more information on the device API to get data from it. But RS232 should be a snap.

Had a good link for you, but can find it now. Heres an example, it looks similar to a dll wrapper i created for the windows API not too long ago, but the basics are the same. original here->

formatting link
'********************************************* '* LIBRARY FUNCTIONS * '*********************************************

Declare Function opencomm Lib "USER" (ByVal LPCOMNAME$, ByVal WINQUEUE%, ByVal woutqueue%) As Integer Declare Function closecomm Lib "USER" (ByVal NCID%) As Integer Declare Function readcomm Lib "USER" (ByVal NCID%, ByVal lpbuf$, ByVal nsize%) As Integer Declare Function buildcommdcb Lib "USER" (ByVal LPSZDEF$, WDCB As tagDCB) As Integer Declare Function setcommstate Lib "USER" (WDCB As tagDCB) As Integer Declare Function getcommerror Lib "USER" (ByVal NCID%, LPSTAT As tagCOMSTAT) As Integer

'********************************************* '* TYPE DECLARATIONS * '*********************************************

Type tagDCB id As Integer baudrate As Long bytesize As Integer parity As Integer stopbits As Integer rlstimeout As Long ctstimeout As Long dsrtimeout As Long fbinary As Long frtsdisable As Long fparity As Long outxctsflow As Long foutxdsrflow As Long fdummy As Long fdtrdisable As Long foutx As Long finx As Long fpechar As Long fnull As Long fchevt As Long fdtrflow As Long ftrsflow As Long fdummy2 As Long xonchar As Integer xoffchar As Integer xonlim As Long xofflim As Long pechar As Integer eofchar As Integer evtchar As Integer txdelay As Long End Type ' tagDCB

Type tagCOMSTAT status As Integer cbinq As Integer cboutq As Integer End Type ' tagCOMSTAT

The essential usage of the functions is:

To close an open com port:

Function close_port() As Integer close_port = closecomm(Port_Num) End Function ' close_port

To open a com port:

Sub open_port() Dim dcbstr As String outstr$ = "com2" + Chr(0) Port_Num = opencomm(outstr$, 1024, 128) Debug.Print Port_Num dcbstr = "com2:1200,n,8,1" & Chr$(0) '

Reply to
Martin Riddle

here->

formatting link

Thanks, Martin. This gets quite complicated. I guess we'll check out the Azeotech factory control package. They have a 25-day or so free trial and it supposedly now supports SPI via the USB which is what we'll have to do most of the time. If that works we'll by licenses.

--
Regards, Joerg

http://www.analogconsultants.com
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.