当前位置:网站首页>[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
[trio basic tutorial 16 from introduction to proficiency] UDP communication test supplement
2022-07-05 08:01:00 【Changjiang houlang blog】
Dear friends , We meet again , Respond to the needs of friends , Specifically right UDP Did the communication expansion test , Share with you !
Testing conditions :
System version :WIN7 64
Programming software :Motion Perfect V4.2.1
Udp Testing software :netassist
Controller firmware :MC4N ECAT V2.0290
The test conditions are cleared , We started testing .
Code up :
'===========================================================
'dim port number
DIM com_port AS INTEGER
DIM get_strinput AS STRING(255)
com_port=20
'===========================================================
'close port and init port
CLOSE#com_port
OPEN#com_port AS "dgram:192.168.0.255(8899)" FOR READ_WRITE
WA(50)
PRINT #com_port,"Hello world!"
WHILE TRUE
IF KEY #com_port THEN
WA(5)
CHANNEL_READ(com_port,get_strinput)
WA(5)
PRINT #com_port,get_strinput
WA(5)
PRINT #5,get_strinput
ENDIF
WA(10)
WEND
Next , We are going to test the software on our upper computer
Be careful : Local IP The address is the address currently set by the computer network card
The local port number is consistent with the controller program port ,TRIO Of UDP The port number is consistent with the remote port number , So here we're going to set theta 8899.
Try running the program
Program sending and receiving communication is normal ....
Thank you for your support , If you don't understand, come to me in private ....
边栏推荐
- H264 (I) i/p/b frame gop/idr/ and other parameters
- Nb-iot technical summary
- 通过sql语句统计特定字段出现次数并排序
- Halcon's practice based on shape template matching [1]
- Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
- ·Practical website·
- Factors affecting the quality of slip rings in production
- Query the table name used by kettle in Oracle
- Consul安装
- Software designer: 03 database system
猜你喜欢
Network communication process
LED display equipment records of the opening ceremony of the Beijing Winter Olympics
Network communication model -- Network OSI tcp/ip layering
Acwing - the collection of pet elves - (multidimensional 01 Backpack + positive and reverse order + two forms of DP for the answer)
UEFI development learning 3 - create UEFI program
Hardware 1 -- relationship between gain and magnification
Communication standard -- communication protocol
Altium designer 19.1.18 - change the transparency of copper laying
C WinForm [get file path -- traverse folder pictures] - practical exercise 6
Train your dataset with yolov4
随机推荐
Global and Chinese market of peeled bourdon tubes 2022-2028: Research Report on technology, participants, trends, market size and share
Software designer: 03 database system
Global and Chinese markets of large aperture scintillators 2022-2028: Research Report on technology, participants, trends, market size and share
[professional literacy] specific direction of analog integrated circuits
Network communication process
C # joint configuration with Halcon
Network communication model -- Network OSI tcp/ip layering
Record the visual shock of the Winter Olympics and the introduction of the screen 2
Train your dataset with yolov4
Global and Chinese markets for medical oxygen machines 2022-2028: Research Report on technology, participants, trends, market size and share
mysql 盲注常见函数
Measurement fitting based on Halcon learning [i] fuse Hdev routine
Process communication mode between different hosts -- socket
Altium designer 19.1.18 - clear information generated by measuring distance
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
1-stm32 operation environment construction
Realization of binary relation of discrete mathematics with C language and its properties
[popular science] some interesting things that I don't know whether they are useful or not
如何进行导电滑环选型
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address