<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>21 Jun 2016 16:18:08 Z</lastBuildDate><pubDate>21 Jun 2016 16:18:08 Z</pubDate><description>Greetings everyone, &#13;
&#13;
I made up a vb.net code, now, I'm trying to migrate it into wlangage.&#13;
In my project, I'm using this .Net library : https://www.dropbox.com/s/69dffveoxqyh2b2/S7.Net.dll?dl=0&#13;
&#13;
And here is the VB.NET code I'm trying to migrate into wlangage :&#13;
&#13;
Dim MyPLC As New Plc&#13;
MyPLC = New MyPLC(CpuType.S7400, "xxx.xxx.x.x", 0, 3)&#13;
Dim l_errorPLC As S7.Net.ErrorCode = MyPLC.Open()&#13;
Select Case l_errorPLC &#13;
Case ErrorCode.NoError&#13;
MsgBox("it works!!!")&#13;
Case ErrorCode.ConnectionError&#13;
MsgBox("Connection error")&#13;
Case ErrorCode.IPAddressNotAvailable&#13;
MsgBox("IP address not found")&#13;
Case ErrorCode.WrongCPU_Type&#13;
MsgBox("CPU type error")&#13;
Case ErrorCode.WrongVarFormat&#13;
MsgBox("Format error")&#13;
Case Else&#13;
MsgBox("Unknown error")&#13;
End Select&#13;
&#13;
My wlangage code is this code :&#13;
[code:wl]&#13;
gf_PLC is S7.Net.Plc dynamic&#13;
gf_PLC=new S7.Net.Plc(20,"xxx.xxx.x.x", 0, 3)&#13;
[/code]&#13;
&#13;
I do have a syntax error between Net and Plc.&#13;
Thanks&#13;
PS: in vb.net code, I can see CpuType.S7400 is 20</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/58229-migrate-net-code-windev-use-library-net/read.awp</link><title>Migrate vb.net code to windev - use of the library S7.Net</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
