Vision VTB-101 Guida Utente Pagina 64

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 125
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 63
64
VTB USER GUIDE
customized protocols.
SET_IP
Sets the parameters of TCP/IP protocol.
Hardware NG35,NGMEVO
Syntax
SET_IP(ip as *char, sm as *char, gw as *char)
Parameters
ip IP address of the device
sm subnet mask
gw gateway
Example
Set_ip(“10,0,0,15”,”255,255,255,0”,0) 'IP = 10,0,0,15
'SUBNET = 255,255,255,0
'GATEWAY = nothing
WARNING: This function must be called in the INIT section of the MAIN or PLC TASK.
PXETH_ADD_PROT
Adds a custom protocol to a specific port of TCP/IP. A custom function to process the new protocol must be written
and its pointer must be pass to this function.
Hardware NG35,NGMEVO
Syntax
PXETH_ADD_PROT(port as long, fun as delegate)
Parameters
port TCP port on which the new protocol is added
fun Pointer to the custom process function
Example
Used variables:
fun delegate
Init section of main:
Set_ip(“10,0,0,15”,0,0) 'set IP = 10,0,0,15
fun=my_protocol
pxeth_add_prot(502,fun) 'Add the protocol my_protocol on port 502
'protocol process function
function my_protocol(len as long, buftx as *char) as long
...
endfunction
Vedere la pagina 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 124 125

Commenti su questo manuale

Nessun commento