International PLC Forum
It is currently Sun Jan 20, 2019 6:07 am

All times are UTC + 3 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Mar 05, 2010 10:11 am 

Joined: Fri Mar 05, 2010 10:01 am
Posts: 1

I'm looking for an example to communicate with simotion D435 and VB.NET through TCP/IP without OPC.

I have set up the D435 as TCP-server and use the VB.NET application as TCP/IP client.

This is no problem but i can't send DINT or reals, only bool and INT.
I can't figure out where the problem is situated. In the D435 or in VB.NET or in both?

Can somebody help me with this.

Best regards


Example D435
//6. Integer 1

IF vopenserver.clientaddress[0] = 192 THEN
            myRetDINT :=
            connectionid := vopenserver.connectionId
            ,nextcommand := immediately
            ,datalength := LENGTH_DATA
            ,data := DATASEND);

Example VB.NET 2003
            BytesRead = client.GetStream.EndRead(ar)
            If BytesRead < 1 Then
                Exit Sub
            End If

            Dim clientdata As String = Encoding.ASCII.GetString(readBuffer)

            Dim s As String
            s = binair(readBuffer(0), 8)

            Dim intValue, b1, b2 As String
            b1 = binair(readBuffer(1), 8)
            b2 = binair(readBuffer(2), 8)
            intValue= b1 & b2
            intValue= Bin_To_Dec(intValue)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 3 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by International PLCforum® Forum Software © PLCforum
Mobile version