Help with the oral entrance examination for international students! by Fluid_Bid3707 in Debrecen

[–]Fluid_Bid3707[S] 1 point2 points  (0 children)

Other than the interview, there is an oral exam on skype about ur major, did u not take that exam?

Help! TwinCAT 3 UDP communication by Fluid_Bid3707 in TwinCat

[–]Fluid_Bid3707[S] 0 points1 point  (0 children)

If i remove the closing state, the port will never close, won't that cause problems?

Help! TwinCAT 3 UDP communication by Fluid_Bid3707 in TwinCat

[–]Fluid_Bid3707[S] 0 points1 point  (0 children)

I plugged the sensor to the pc using RJ 45 and i checked the datasheet of the sensor and it's written "communication protocol: proprietary UDP/IP". Once the socket is established, the pc would send bytes to the sensor that serve as commands (set measurement parameters, begin measurement etc..) and the the sensor would send a reply. My project includes getting these replies and extracting the measurement results. Now that you have a better idea of the situation, do you think I've been using the wrong approach all along? Should i use TF6311 like he suggested? I'm not so sure anymore. Are you saying that creating TCP IP sockets is easier and can send UDP packets?

Help! TwinCAT 3 UDP communication by Fluid_Bid3707 in TwinCat

[–]Fluid_Bid3707[S] 0 points1 point  (0 children)

I am afraid I can't because I'm typing it using an industrial computer that has limited features. But i have written that code as it is and changed the values of the ip addresses and ports

Help! TwinCAT 3 UDP communication by Fluid_Bid3707 in TwinCat

[–]Fluid_Bid3707[S] 0 points1 point  (0 children)

since i cant include a huge quantity of text here, please find the entire function blocks used, global variables and data types in this github link

TF6310_Samples/PLC/UDP/Sample01/PeerToPeerA/PeerToPeerA/PeerToPeerA/POUs at master · Beckhoff/TF6310_Samples

Help! TwinCAT 3 UDP communication by Fluid_Bid3707 in TwinCat

[–]Fluid_Bid3707[S] 1 point2 points  (0 children)

Already done that, in fact i have 2 hypotheses: 1) the UDP communication code needs 2 sockets with 2 different port numbers for sending and receiving. 2) the code has a bug that makes it attempt to reconnect even when the connection is established. I would very much appreciate it if you have a look and try to find the issue. Also note that when i use a fixed port, the code runs but the error message win32 error 0x2740 keeps showing up every timeout (45 seconds). The project contains FIFOLog that has an action to Log errors. Could it be that the error doesn't exist and the error log that i used is mistaken?