Академический Документы
Профессиональный Документы
Культура Документы
Setting Up A Server
First client sends a signal to server to start the communication and the
server replies with a data packet which in our case is a XML string.
Therefore “TCP Listen.vi” is used which waits for an incoming signal.
Input Output
Port:6008 Connection ID: Unique ID and is
used in subsequent blocks.
Net address: String to IP. vi Remote Address: IP of the
present TCP\IP palette. client(Robot).
Input Output
Connection ID: From TCP listen .vi Connection ID:Used in subsequent VI’s
Data In: Data to be written which is Bytes Written: No. Of bytes
contents of file “ExternalData.xml” transferred to client.
After This robot replies with a XML string and “TCP Read.vi” is used for receiving
the data packet.
Input Output
Connection ID: From TCP Write .vi Connection ID: Used in subsequent
VI’s
Bytes to read: No. Of bytes to be read Data Out: Received Data .
340 in this case . Use hit an trial
method to figure out no. Of bytes.
Input Output
Number: Input number F-Format string: Coordinates in form
of string.
Width: Number of digits needed to
represent the number .Value is 7
Precision: Number of digits after
decimal point. Value is 2.
Three replace substring vi’s are used , the output of first vi will be the input
of second and output of second will be the input of 3RD and output of 3RD
will be the final string which is written in file EXternalData.xml .
After the increment is calculated by moving the joystick ,button 2 is pressed
which terminates the while loop and data is written to externaldata.xml
using write to text file VI(7).
After the file is written, inner loop of main vi starts to execute and
contents of updated externaldata.xml is sent to robot.
This process continues and there is continuous exchange of XML
strings between external pc and robot.
All the string related VI’s are present in function palette under
programming->string.
VI’s related to text files are present in function palette under
programming->File I\O.
For any queries related to labview use Google or post the problem on
official labview forum and someone will definitely reply to the query.