Prodave .net/C#

Finally got this working. If anyone is ever trying, here is what I got to work (this is first iteration and not very robust):



[DllImport("Prodave6.dll",EntryPoint="LoadConnection_ex6",ExactSpelling=true,CharSet=CharSet.Ansi,CallingConvention=CallingConvention.Cdecl)]private static extern int LoadConnection_ex6(ushort ConNr,char[] pAccessPoint, int ConTableLen,byte[] ConTable);

public int connection()

{

char[] pAccessPoint ={ 'S', '7', 'O', 'N', 'L', 'I', 'N', 'E' };

//IP Address = 192.168.1.200, connection type =2 (IP)

byte[] conn = new byte[] { 192, 168, 1, 200, 0, 0, 2, 0, 0 };
int length = (int)conn.Length;
int res = LoadConnection_ex6((ushort)0, pAccessPoint, length, conn);

return res;

}



 

Similar Topics

Hello folks, Is there someone out there who has a simple example S7 project that communicates with pc by means of delphi and prodave? Thx
Replies
14
Views
7,053
Hello I have Prodave V6.0 IE and i want to communicate with a plc through IE. The standard example of Siemens is stil with a MPI communication...
Replies
0
Views
1,729
Hello, I am in the process of writing a scada front end on a robot cell i am building. I am using Prodave 5 to connect to a S7315. I am looking...
Replies
2
Views
3,349
hello, i want to recognize telegrams send by S7 via mpi with prodave-dll method and got no clue which method I could use... or how to do it the...
Replies
1
Views
2,096
This is a call to very one ever used Prodave to manipulate the siemens s7-300 plc's. How do you implement code in Visual basic for mix_read and...
Replies
0
Views
2,219
Back
Top Bottom