Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. Visual Studio 6.0
[VB6] Aiuto per OPC Client Siemens VB6
martedì 13 ottobre 2015 - 10.51
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
Mrk31
Profilo
| Newbie
17
messaggi | Data Invio:
mar 13 ott 2015 - 10:51
Ciao a tutti,
ho un "vecchio" software in VB6 che comunica con una serie di PLC tramite le librerie APPLICOM, in particolare utilizzando i seguenti metodi:
Declare Sub exitbus Lib "applicom" (stat As Integer)
Declare Sub initbus Lib "applicom" (stat As Integer)
Declare Sub writeword Lib "applicom" (chan As Integer, Nes As Integer, nb As Integer, tadr As Long, tabl As Integer, stat As Integer)
Declare Sub readword Lib "applicom" (chan As Integer, Nes As Integer, nb As Integer, tadr As Long, tabl As Integer, stat As Integer)
Declare Sub readdword Lib "applicom" (chan As Integer, Nes As Integer, nb As Integer, tadr As Long, tabl As Long, stat As Integer)
Declare Sub readpackbyte Lib "applicom" (chan As Integer, Nes As Integer, nb As Integer, tadr As Long, tabl As Byte, stat As Integer)
Declare Sub writepackbyte Lib "applicom" (nchan As Integer, Nes As Integer, nb As Integer, adr As Long, tabl As Byte, stat As Integer)
Declare Sub getpackbyte Lib "applicom" (ncard As Integer, nb As Integer, tadr As Integer, tabl As Byte, stat As Integer)
Declare Sub setpackbyte Lib "applicom" (ncard As Integer, nb As Integer, tadr As Integer, tabl As Byte, stat As Integer)
Declare Sub setword Lib "applicom" (ncard As Integer, nb As Integer, tadr As Integer, tabl As Integer, stat As Integer)
Si è deciso di cambiare l'architettura della rete per motivi di espandibilità e "Switchare" passando alle librerie Siemens OPC.
Avendo tempi stretti vorrei cercare di creare una sorta di Adapter (l'applicativo è scritto con codice procedurale non OO) dei metodi APPLICOM.
Non ho trovato niente per VB6, ma ho trovato un esempio per VBA:
https://support.industry.siemens.com/cs/document/24299099/how-do-you-create-an-opc-client-with-microsoft-excel?dti=0&lc=en-WW
Da questo esempio ho visto che non è possibile leggere direttamente il registro num x e che non esistono metodi per leggere direttamente word, packetbyte etc...ma un unico metodo read.
Inoltre dovrei configurare tramite un qualche Software Siemens (Ho installato tutto il contenuto del CD ma non ho bene idea di quale sia il programma da utilizzare tra tutti quelli presenti) "mappare" i PLC ed i vari registri secondo la logica di Gruppi ed GroupItems che "vuole" siemens...
Qualcuno ha idea di come districarmi tra i programmi Siemens?
Vi ringrazio in anticipo!!!
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !