Hello
i want to send data from homeseer to a siemens PLC but get some errors when trying to create a script.
I am trying to call a DLL but i get some error messages :
The DLL is referenced in the settings.ini :
ScriptingReferences=DDay.iCal;DDay.iCal.dll,DDay.Collections ;DDay.Collections.dll,antlr.runtime;antlr.runtime.dll;snap7. net;Snap7.net.dll
also the filles are copied in : C:\Program Files (x86)\HomeSeer HS3\
But i got 2 filles : Snap7.dll and Snap7.net.dll
i tried both of them, also i checked if i used the correct file x86 vs x64,
according to http://snap7.sourceforge.net/
VB
Unluckily for you, you cannot use directly snap7.net.cs in your program because it’s a c# source class library.
To be used, the wrapper must be compiled into a compiled class library, i.e. an “universal” .net library that can be loaded by any .net language.
You need of : snap7.net.dll
In spite of its extension, snap7.net.dll is not a windows DLL (like snap7.dll) but a class library. Thank Microsoft for the enlightening name
So, in order to use the snap7 classes, you need to import snap7.net.dll referencing it into the project properties, otherwise the compiler does not know how to find them.
so should i reference snap7.dll or snap7.net.dll ?
some code i use :
Imports Snap7
Sub Main(ByVal Parms As Object)
'==========================================================
'Modify these to fit your system
dim PLC_IP = "192.168.0.199"
Dim UDTLength = 100
'==========================================================
Dim Buffer() As Byte ' Buffer
Dim Client As Snap7.S7Client ' Client Object
Thx. Doebe
i want to send data from homeseer to a siemens PLC but get some errors when trying to create a script.
I am trying to call a DLL but i get some error messages :
aug-30 16:06:16 | Error | Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\TX_PLC.vb: Type 'Snap7.S7Client' is not defined. |
aug-30 16:06:16 | Error | Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\TX_PLC.vb: Namespace or type specified in the Imports 'Snap7' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. |
aug-30 16:06:16 | Error | Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\TX_PLC.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. |
The DLL is referenced in the settings.ini :
ScriptingReferences=DDay.iCal;DDay.iCal.dll,DDay.Collections ;DDay.Collections.dll,antlr.runtime;antlr.runtime.dll;snap7. net;Snap7.net.dll
also the filles are copied in : C:\Program Files (x86)\HomeSeer HS3\
But i got 2 filles : Snap7.dll and Snap7.net.dll
i tried both of them, also i checked if i used the correct file x86 vs x64,
according to http://snap7.sourceforge.net/
VB
Unluckily for you, you cannot use directly snap7.net.cs in your program because it’s a c# source class library.
To be used, the wrapper must be compiled into a compiled class library, i.e. an “universal” .net library that can be loaded by any .net language.
You need of : snap7.net.dll
In spite of its extension, snap7.net.dll is not a windows DLL (like snap7.dll) but a class library. Thank Microsoft for the enlightening name
So, in order to use the snap7 classes, you need to import snap7.net.dll referencing it into the project properties, otherwise the compiler does not know how to find them.
so should i reference snap7.dll or snap7.net.dll ?
some code i use :
Imports Snap7
Sub Main(ByVal Parms As Object)
'==========================================================
'Modify these to fit your system
dim PLC_IP = "192.168.0.199"
Dim UDTLength = 100
'==========================================================
Dim Buffer() As Byte ' Buffer
Dim Client As Snap7.S7Client ' Client Object
Thx. Doebe
Comment