当前位置:网站首页>[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 ....
边栏推荐
- C WinForm [display real-time time in the status bar] - practical exercise 1
- Global and Chinese markets of large aperture scintillators 2022-2028: Research Report on technology, participants, trends, market size and share
- Drive LED -- GPIO control
- C WinForm [get file path -- traverse folder pictures] - practical exercise 6
- Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
- VESC Benjamin test motor parameters
- Cadence learning records
- The printer encountered an abnormal configuration problem 0x8007007e (win10)
- Record the visual shock of the Winter Olympics and the introduction of the screen 2
- Summary -st2.0 Hall angle estimation
猜你喜欢

Altium Designer 19.1.18 - 导入板框

Embedded composition and route

Hardware 3 -- function of voltage follower

Communication standard -- communication protocol

C language enhancement -- pointer
![C WinForm [get file path -- traverse folder pictures] - practical exercise 6](/img/8b/1e470de4e4ecd4fd1bb8e5cf23f466.jpg)
C WinForm [get file path -- traverse folder pictures] - practical exercise 6

Use of orbbec Astra depth camera of OBI Zhongguang in ROS melody

Connection mode - bridge and net

C language # and #

软件设计师:03-数据库系统
随机推荐
Programming knowledge -- assembly knowledge
Record the torch encountered by win10 cuda. is_ False problem in available()
Embedded composition and route
Software designer: 03 database system
Consul installation
Summary -st2.0 Hall angle estimation
Development tools -- gcc compiler usage
Shape template matching based on Halcon learning [9] PM_ multiple_ dxf_ models. Hdev routine -- [read and write XLD from DXF file]
STM32 learning method
Shell script basic syntax
Application of ultra pure water particle counter in electronic semiconductors
mysql 盲注常见函数
万字详解八大排序 必读(代码+动图演示)
Relationship between line voltage and phase voltage, line current and phase current
The browser cannot access Baidu
Global and Chinese markets for flexible endoscopic lithotripsy devices 2022-2028: Research Report on technology, participants, trends, market size and share
Bootloader implementation of PIC MCU
High end electronic chips help upgrade traditional oil particle monitoring
Correlation based template matching based on Halcon learning [II] find_ ncc_ model_ defocused_ precision. hdev
Measurement fitting based on Halcon learning [i] fuse Hdev routine