当前位置:网站首页>[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 ....
边栏推荐
- Use of orbbec Astra depth camera of OBI Zhongguang in ROS melody
- Query the table name used by kettle in Oracle
- Embedded AI intelligent technology liquid particle counter
- Can't find real-time chat software? Recommend to you what e-commerce enterprises are using!
- ·Practical website·
- Shape template matching based on Halcon learning [v] find_ cocoa_ packages_ max_ deformation. Hdev routine
- Record the torch encountered by win10 cuda. is_ False problem in available()
- Programming knowledge -- basis of C language
- Basic embedded concepts
- C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
猜你喜欢
研究发现,跨境电商客服系统都有这五点功能!
Shape template matching based on Halcon learning [v] find_ cocoa_ packages_ max_ deformation. Hdev routine
万字详解八大排序 必读(代码+动图演示)
Halcon's practice based on shape template matching [1]
Realization of binary relation of discrete mathematics with C language and its properties
Carrier period, electrical speed, carrier period variation
Drive LED -- GPIO control
如何进行导电滑环选型
1-stm32 operation environment construction
Altium designer 19.1.18 - clear information generated by measuring distance
随机推荐
Hardware 3 -- function of voltage follower
2021-10-28
How to select conductive slip ring
How to define guid in AMI code
Correlation based template matching based on Halcon learning [II] find_ ncc_ model_ defocused_ precision. hdev
Makefile application
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
Ten thousand words detailed eight sorting must read (code + dynamic diagram demonstration)
OLED 0.96 inch test
Development tools -- gcc compiler usage
1-stm32 operation environment construction
Reasons for rapid wear of conductive slip rings
Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
Halcon's practice based on shape template matching [1]
Global and Chinese market of rammers 2022-2028: Research Report on technology, participants, trends, market size and share
Improve lighting C program
Global and Chinese market for blood typing 2022-2028: Research Report on technology, participants, trends, market size and share
String judgment
导电滑环磨损快的原因
Network communication model -- Network OSI tcp/ip layering