Dear All,
I am using Ethernet krl for some perpose. I need my robot to be server. Ip address of KLI is 192.168.1.9 and I am able to connect with work visual and have installed corresponding KOP, no problem till here. Now I am trying to make a program to open a port 54600 on the same ip address but not successfull till now.
Configuration file-
<ETHERNETKRL>
<CONFIGURATION>
<EXTERNAL>
<TYPE>Client</TYPE>
</EXTERNAL>
<INTERNAL>
<ENVIRONMENT>Program</ENVIRONMENT>
<BUFFERING Mode="LIFO" Limit="16"/>
<BUFFSIZE Limit="13029"/>
<ALIVE Set_Flag="1"/>
<IP>192.168.1.9</IP>
<PORT>54600</PORT>
<PROTOCOL>TCP</PROTOCOL>
<MESSAGES Logging="warning" Display="error" />
</INTERNAL>
</CONFIGURATION>
<RECEIVE>
<XML>
<ELEMENT Tag="Ext/Command/Type" Type="INT" />
<ELEMENT Tag="Ext/Command/Param" Type="STRING" />
<ELEMENT Tag="Ext/Debug/Answer" Type="INT" />
<ELEMENT Tag="Ext" Set_Flag="4"/>
</XML>
</RECEIVE>
<SEND>
<XML>
<ELEMENT Tag="Robot/Data/Debug/@Result"/>
</XML>
</SEND>
</ETHERNETKRL>
Display More
Robot Program-
DEF ram( )
RET=EKI_Init("RPSCmd")
RET=EKI_Open("RPSCmd")
WAIT FOR ( $FLAG[1] )
WAIT FOR ( $FLAG[1]==FALSE )
RET=EKI_Clear("RPSCmd")
END
In the log viewer when program is running there is no error but when I deselect the program I get these below errors-
BASIC dEthernetK 12:45:17.167 : MemObject: Successfully initialized memory pool of size 1048576 bytes.
BASIC dEthernetK 12:45:17.216 : CEKIApp: EthernetKRL application created.
ERROR RPSCmd 12:54:27.917 : CTcpSock: Failed to accept socket '455' (Code: 9)
ERROR RPSCmd 12:54:27.917 : CIoDevice: Failed to accept TCP connection on port 54600 with timeout -1. (Code=-1)
WARN RPSCmd 12:54:27.917 : CSystemCall: $Flag[1] is already '0'! Possible lost of interrupt edge at tick:635526
ERROR RPSCmd 12:54:27.917 : CConnection: Listening for IoDevice
WARN tFctCall 12:54:27.917 : CSystemCall: $Flag[1] is already '0'! Possible lost of interrupt edge at tick:635526
ERROR dEthernetK 12:54:34.882 : COperator: connection list is empty. (Cleared channel of type '0'.)
I am not able to open the port by looking command netstat -an in the command prompt, how ever if I swith to server.exe which is supplied by Ethernet krl software, I am able to open the port. So in summary I am not able to open the port from with program. Please help what is wrong with me.
Update-One more thing, Some how the Ip address of server in xml file is not working. If I change the ip to x.x.x.x even than the situation and error remains the same.
Update- I canged my configuration to be robot as client and the utility krl_server.exe as server. Even with the client xml , robot is not able to open the ports.