当前位置:网站首页>[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 ....
边栏推荐
- Altium designer 19.1.18 - Import frame
- UEFI development learning series
- Some tips for using source insight (solve the problem of selecting all)
- Create inf module in AMI code
- Global and Chinese market of peeled bourdon tubes 2022-2028: Research Report on technology, participants, trends, market size and share
- About the problem that MySQL connector net cannot be cleared in MySQL
- Record the opening ceremony of Beijing Winter Olympics with display equipment
- Connection mode - bridge and net
- MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一
- IEEE access personal contribution experience record
猜你喜欢

Drive LED -- GPIO control

Ten thousand words detailed eight sorting must read (code + dynamic diagram demonstration)

Scm-05 basis of independent keyboard
![C WinForm [display real-time time in the status bar] - practical exercise 1](/img/9f/d193cbb488542cc4c439efd79c4963.jpg)
C WinForm [display real-time time in the status bar] - practical exercise 1

Altium designer 19.1.18 - Import frame

MLPerf Training v2.0 榜单发布,在同等GPU配置下百度飞桨性能世界第一

Software designer: 03 database system

研究發現,跨境電商客服系統都有這五點功能!

Network port usage

Altium Designer 19.1.18 - 导入板框
随机推荐
Global and Chinese market of plastic recycling machines 2022-2028: Research Report on technology, participants, trends, market size and share
Application of ultra pure water particle counter in electronic semiconductors
找不到实时聊天软件?给你推荐电商企业都在用的!
Acwing-宠物小精灵之收服-(多维01背包+正序倒序+两种形式dp求答案)
Process communication mode between different hosts -- socket
Global and Chinese market of rammers 2022-2028: Research Report on technology, participants, trends, market size and share
Network port usage
C WinForm [help interface - send email] - practice five
IEEE access personal contribution experience record
Train your dataset with yolov4
1-stm32 operation environment construction
C language # and #
Embedded composition and route
[professional literacy] specific direction of analog integrated circuits
Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
Shape template matching based on Halcon learning [vi] find_ mirror_ dies. Hdev routine
Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
C # joint configuration with Halcon
The research found that the cross-border e-commerce customer service system has these five functions!
Network communication model -- Network OSI tcp/ip layering