当前位置:网站首页>[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 ....
边栏推荐
- Pointnet++ classification practice
- Connection mode - bridge and net
- Development tools -- gcc compiler usage
- Hardware 1 -- relationship between gain and magnification
- About the problem that MySQL connector net cannot be cleared in MySQL
- Wifi-802.11 negotiation rate table
- UEFI development learning 4 - getting to know variable services
- C WinForm [change the position of the form after running] - Practical Exercise 4
- Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
- Improve lighting C program
猜你喜欢
C WinForm [view status bar -- statusstrip] - Practice 2
Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
UEFI development learning 2 - running ovmf in QEMU
Altium Designer 19.1.18 - 更改铺铜的透明度
Altium Designer 19.1.18 - 导入板框
Embedded AI intelligent technology liquid particle counter
A complete set of indicators for the 10000 class clean room of electronic semiconductors
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
Nb-iot technical summary
VESC Benjamin test motor parameters
随机推荐
Wifi-802.11 negotiation rate table
如何将EasyCVR平台RTSP接入的设备数据迁移到EasyNVR中?
Cadence learning records
Gradle composite construction
Acwing-宠物小精灵之收服-(多维01背包+正序倒序+两种形式dp求答案)
Global and Chinese markets for waste treatment air switches 2022-2028: Research Report on technology, participants, trends, market size and share
About the problem that MySQL connector net cannot be cleared in MySQL
mysql 盲注常见函数
How to define guid in AMI code
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
找不到实时聊天软件?给你推荐电商企业都在用的!
Global and Chinese market of core pallets 2022-2028: Research Report on technology, participants, trends, market size and share
Altium designer 19.1.18 - hide the fly line of a network
Process communication mode between different hosts -- socket
研究发现,跨境电商客服系统都有这五点功能!
Ads usage skills
软件设计师:03-数据库系统
IC software learning
C language # and #
Ads learning record (lna_atf54143)