¡@

ISaGRAF 029

back

  Q: How to send/receive message from ISaGRAF controller to remote PCs or Controllers via Ethernet UDP communication ?

¡@

  Ans:  

  I-7188EG : driver 2.08 or later
  I-8437/8337 : driver 3.10 or later
  W-8x37/8x36 : driver ver. 3.22 (Dec.12,2005) or later

  Note :
  1. I-7188EG & I-8437/8837 support only ¡§udp_ip¡¨ & ¡§udp_recv¡¨
  2. WinCon-8x36 and WinCon-8x37 support all of ¡§udp_ip¡¨ , ¡§udp_recv¡¨ & ¡§udp_send¡¨

  UDP_IP :

  Please connect ¡§udp_ip¡¨ in the ISaGRAF I/O connection window first before using ¡§udp_recv¡¨ and ¡§udp_send¡¨
  functions.


 

  UDP_Recv :

  To receive message from remote PCs or controllers, please use ¡§udp_recv¡¨ function.

  For example:

  (* test if message is coming from UDP *)
  (* Msg1 is declared as Message variable *)
  (* if return = '' (empty message), that means no message coming *)
  Msg1 := udp_recv( ) ;

  Note :
  1.The receiving buffer size for WinCon is 8192 bytes - include one extra message end: 1 byte in each
      message. While for I-7188EG & I-8437/8837 is 2048 bytes.
  2.If the receiving buffer is full, the oldest received message will be overwritten.

  UDP_Send :

  To send message to remote PCs or controllers, please use ¡§udp_send¡¨ function.

  For example:

  (* TMP is declared as Internal / Boolean *)
  (* 1st parameter: To which connection - defined in IO connection "udp_ip", can be 1 to 4 *)
  (* 2nd parameter: the message to send out *)
  (* Return True:Ok, False: sending buffer is full or connection not defined well in ¡§udp_ip¡¨ *)
  TMP := udp_send(1, ¡¥Alarm1' );

  Note :
  1. The sending buffer size for WinCon is 2048 bytes - include extra message end: 1 byte. That means max. 2048 
      bytes in one PLC scan can be send to remote IP.
  2. Please do not send lots of bytes in one PLC scan cycle too frequent. The controller driver will actually send only
      one message out each PLC scan when there is message in the sending buffer. For example, if there is 100
      messages in the sending buffer, the controller will send over these 100 message in 100 PLC scan cycles.
  3. I-7188EG & I-8437/8837 support only ¡§udp_ip¡¨ & ¡§udp_recv¡¨

  Example :

  Please refer to WinCon CD-ROM:\napdos\isagraf\wincon\demo\wdemo_19 & Wdemo_20. Or
  http://ftp.icpdas.com/pub/cd/winconcd/napdos/isagraf/wincon/demo/

  If you can not find ¡§udp_ip¡¨ , ¡§udp_recv¡¨ and ¡§udp_send¡¨ in your ISaGRAF, please visit
  http://www.icpdas.com/products/PAC/I-8000/isagraf.htm to download ¡§ICP DAS Utilities For ISaGRAF.zip¡¨. For
  new driver please click ¡§New Driver for I-8xx7, 7188EG/XG & W-8x37¡¨

 

back

Written by Chun Tsai 

Date:2005/12/13