home

prodotti download novità assistenza tecnica contatti

chi siamo

     

presentazione

modalità di lavoro

hardware supportato

tabella caratteristiche

esempi applicazioni

supporto tecnico

domande e risposte

NOVITA' VERSIONE 4

 

PER SAPERNE DI PIU'

scarica brochure

richiedi maggiori info

richiedi un preventivo

contatta PATRUCCO

 

PRODOTTI COLLEGATI

CE-Wedge
acquisizione dati da porta seriale in applicativi Windows CE

BC-Wedge
acquisizione dati da lettori codici a barre

TCP-Wedge
acquisizione dati da TCP/IP in applicativi Windows

TCP-Com
convertitore RS232 in TCP/IP

COM-File
acquisizione dati da porta seriale su file

TCP-File
acquisizione dati da TCP/IP su file

 

REQUISITI DI SISTEMA

WinWedge può operare con QUALSIASI applicativo per Windows e con qualunque versione di Windows (98/Me/2000
/NT/XP/Vista/7)

WinWedge supporta un ampio intervallo di dispositivi seriali compresi la maggior parte degli strumenti di tipo industriali e di laboratorio

Tutte le versioni di WinWedge sono applicazioni di piccole dimensioni che possono operare anche con requisiti di sistema minimi

 

ACQUISIZIONE DATI

WinWedge
Software per acquisizione dati da porta seriale in applicativi Windows

Launching WinWedge from Excel

The following VBA subroutine executes the Software Wedge and passes it the name of a WinWedge configuration file (MyConfig.SW3) on the command line. This causes WinWedge to automatically load the specified configuration file and then activate itself in NORMAL mode.
 
Public Const MyPort$ = "COM1" ' change port if necessary
Sub RunWedge()
' Set up an error trap
On Error Goto ErrorHandler

' try to activate the Wedge Window
' if Wedge is not running or activated this line will generate an error

AppActivate "Software Wedge - " + MyPort$
 

''''''''''''''''''''''''''''''''''''''''''''''
' NOTE: For WinWedge 3.0 Std use:

' AppActivate "WinWedge - " + MyPort$
''''''''''''''''''''''''''''''''''''''''''''''


' remove error trap
On Error Goto 0

' set the focus back to excel & exit
AppActivate Application.Caption
Exit Sub

ErrorHandler:

' If we get here the wedge is not running, so launch it:
RetVal = Shell("C:\WINWEDGE\WINWEDGE.EXE _
C:\WINWEDGE\MyConfig.SW3")

' give wedge time to load ~ 2 secs, then resume.
Application.Wait Now + TimeValue("00:00:02")
Resume Next

 

End Sub

Note:
If you name an Excel subroutine "Auto_Open()", Excel will automatically run the routine whenever the spreadsheet that contains it is initially opened. The Auto_Open subroutine is an excellent place to launch the Wedge (as well as do any other initialization functions that you might require). If you re-name the above subroutine to "Auto_Open()" then you can save yourself the step of having to manually run the above subroutine.

Similar to the Auto_Open subroutine, Excel also supports an Auto_Close subroutine that runs automatically when you close your spreadsheet. This might be a good place to tell the Wedge to quit and unload itself from memory as in the following example.
 

Sub Auto_Close() ' this sub runs when you close
' the sheet
On Error Resume Next
chan = DDEInitiate("WinWedge", MyPort$)
DDEExecute chan, "[Appexit]"
DDETerminate chan
' ignore errors and try to launch
' WinWedge
' open a dde link with the wedge
' tell wedge to quit
'Terminate the channel
End Sub
 

Copyright © PATRUCCO snc. Tutti i diritti riservati. Riproduzione o copia proibita.