当前位置:网站首页>[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 ....
边栏推荐
- Acwing - the collection of pet elves - (multidimensional 01 Backpack + positive and reverse order + two forms of DP for the answer)
- General makefile (I) single C language compilation template
- Bootloader implementation of PIC MCU
- Global and Chinese market of rammers 2022-2028: Research Report on technology, participants, trends, market size and share
- [professional literacy] core conferences and periodicals in the field of integrated circuits
- Realization of binary relation of discrete mathematics with C language and its properties
- Record the visual shock of the Winter Olympics and the introduction of the screen 2
- Extended application of single chip microcomputer-06 independent key
- Global and Chinese markets for waste treatment air switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Embedded AI intelligent technology liquid particle counter
猜你喜欢

Realization of binary relation of discrete mathematics with C language and its properties

Consul安装

UEFI development learning 2 - running ovmf in QEMU

Class of color image processing based on Halcon learning_ ndim_ norm. hdev

About the problem that MySQL connector net cannot be cleared in MySQL

Network communication process

UEFI development learning 3 - create UEFI program

Significance and requirements of semiconductor particle control

如何进行导电滑环选型
![Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine](/img/55/0f05291755dc1c3c03db8e991a1ba1.jpg)
Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
随机推荐
软件设计师:03-数据库系统
Gradle复合构建
WiFi wpa_ Detailed description of supplicant hostpad interface
Global and Chinese markets for recycled boilers 2022-2028: Research Report on technology, participants, trends, market size and share
C WinForm [get file path -- traverse folder pictures] - practical exercise 6
Random function usage notes
Ads usage skills
[professional literacy] specific direction of analog integrated circuits
1-stm32 operation environment construction
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
导电滑环磨损快的原因
Altium designer 19.1.18 - hide the fly line of a network
Realization of binary relation of discrete mathematics with C language and its properties
PMSM dead time compensation
Altium designer 19.1.18 - Import frame
Global and Chinese market of resistivity meter 2022-2028: Research Report on technology, participants, trends, market size and share
Screen record of the opening ceremony of the Beijing winter olympics 2
Query the table name used by kettle in Oracle
Use of orbbec Astra depth camera of OBI Zhongguang in ROS melody
Win10 shortcut key