Back to top

Getting Started with PxMM UDP Communications - using Packet Sender

KAS UDP Communication

Introduction

This application note uses the PC utility Packet Sender (download at  https://packetsender.com/) to perform simple communications between a PxMM and a PC. The program “udpProgram” in the project UDP test Send-Receive First Transmission Each Way.kas has been added to a .kas starter project (attached).

IP Addresses

  • PC  address:192.168.0.100
  • PDMM Address: 192.168.0.102

Note: You may need to use different IP Addresses that fits with your network addressing scheme.

PDMM to PC communications – key function blocks

Setup

  • Sending PDMM’s Port Number: 10  (using udpCreate  and create the Socket to send Data)
  • Receiving Device’s Port Number: 20 (using udpAddrMake )
  • Receiving Device’s IP address: 192.168.0.100 (using udpAddrMake )
  • Command to Send Data: udpSendTo

PC to PDMM communications – key function blocks

Setup

  • Receiving PDMM’s Port Number: 50  (using udpCreate and Create the Socket to Receive Data )
  • Command to Receive Data:  udpReceiveFrom

Port Summary

Product Port Number to Receive Data Port Number to Send Data
PDMM 50 10
PC (Host) 20 xxxx

Operation

  1. Startup UDP Sender on PC
  2. Go to File / Settings then Network Tab and setup as follows
    image
    and setup as follows:
    image
  3. In the Packet Sender main screen setup as follows:
    image
  4. Startup PxMM Project
  5. First PxMM Transmission: In the IDE Dictionary set StartTest = 1 to start the test. See that the following line has been Added to the Packet Sender Log
  6. First PxMM Transmission: Observe the following log entry has been added:
    image
  7. First PC Transmission: In Packet Sender Click on the Send Button
  8. First PC Transmission: Observe the following log entry has been added:
    image
  9. Complete log:
    image