Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

SETTCP Change LocalPort in Runtime

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP
View previous topic :: View next topic  
Author Message
katipefendi

Bascom Member



Joined: 24 Oct 2013
Posts: 30

blank.gif
PostPosted: Wed Jul 04, 2018 11:13 pm    Post subject: SETTCP Change LocalPort in Runtime Reply with quote

Hello,

how can i Change the Prt like IP, Submaske, Gateway a.s
Is it possible?

thanks
Katip
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Thu Jul 05, 2018 8:59 am    Post subject: Reply with quote

there is the variable named LOCAL_PORT which you can alter.
See also config tcpip

_________________
Mark
Back to top
View user's profile Visit poster's website
katipefendi

Bascom Member



Joined: 24 Oct 2013
Posts: 30

blank.gif
PostPosted: Thu Jul 05, 2018 4:57 pm    Post subject: Reply with quote

Hi Mark,

can you show me how can i change this in my case?

Code:

Dim Local_port As Long

'Setip_r = Maketcp(setip)
'Setsubmaske_r = Maketcp(setsubmaske)
'Setgateway_r = Maketcp(setgateway)

 'Settcp 0.8.220.77.05.11 , Setip_r , Setsubmaske_r , Setgateway_r
 Local_port = 2011

Config Tcpip = Int0 , Mac = 0.8.220.77.05.11 , Ip = 192.168.178.29 , Submask = 255.255.255.0 , Gateway = 192.168.178.1 , Localport = 2005 , Chip = W5500 , Spi = 1 , Cs = Portb.4
 

i get only an error, that Variable not dimensioned
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Thu Jul 05, 2018 9:08 pm    Post subject: Reply with quote

local_port is already defined by the compiler !
When using CONFIG TCPIP (see help) , a variable LOCAL_PORT is created which is a WORD variable.

After the config tcpip you can use :
LOCAL_PORT = something

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> EASY TCP/IP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum