7/27/2006 1:53 PM | |
Joined: 10/10/2005 Last visit: 11/27/2024 Posts: 1921 Rating: (136) |
Hello, http://www.siemens.com/automation/csi_en/product |
7/28/2006 2:11 AM | |
Posts: 1 Rating: (0) |
I ran into the same problem but in VB.net 2005. and eventually figured it out. The main problem is that the arrays in the opc dll is 1 based. The .net programs are 0 based (can't be changed to 1 based like vb6) In .net 2005 you can indirectly create a 1 based array by using CreatInstance (like you have done) however I found an option to create a 1 based array (it doesn't seem to be documented). I have attached the VB6 sample that came with the PC-access which i have modified to work with .NET. It is in VB.net but it should be relatively straight forward to convert to c# Hope it helps. I have not converted the async read and writes (i think) so only look at the sync read and writes commands Note the array_length variable and array_lowerbound arrays. AttachmentMainFormTweaked.zip (969 Downloads) |
Last edited by: Westcoaster at: 7/28/2006 2:18 AM |
|
Follow us on