I am trying to navigate IP addresses, ethernet switches, etc. on an OmniCore controller. And I'm a dunce when it comes to networks and communications. I am currently trying to establish socket messaging between the controller and an Asyril vibratory feeder. Asyril has confirmed that this should work, and I can communicate with the feeder directly from my PC if I connect to it.
OmniCore has the following options that pertain to my issue
- 3020-2 PROFINET Device
- 3023-2 PROFIsafe Device
- 3024-2 Ethernet/IP Adapter
- 3114-1 Multitasking
Public (WAN) Settings
IP Address: 192.168.10.10
Subnet: 255.255.255.0
Gateway: 192.168.10.10
Port Speed: Auto
Asyril Feeder Settings
IP Address: 192.168.10.151
Subnet: 255.255.255.0
TCP Port: 4001
So I have a background task that will (hopefully, eventually) handle all the communication and logic for the feeder. In that task, I am currently just trying to set up the socket and test the communication by sending a command and waiting for a reply.
MODULE Asycube_MAIN
VAR socketdev socket_CUBE1;
VAR socketdev socket_CUBE2;
VAR string received_string;
CONST string CUBE1_IP:="192.168.10.151";
CONST string CUBE2_IP:="192.168.10.152";
CONST num CUBE1_Port:=4001;
CONST num CUBE2_Port:=4001;
PROC main()
Init_Cubes;
WaitTime 1;
AsyCube_GetRecipe;
WaitDI diBGR1_RingSens,1;
ENDPROC
PROC Init_Cubes()
SocketCreate socket_CUBE1;
SocketBind socket_CUBE1, CUBE1_IP,CUBE1_Port;
ENDPROC
Display More
However, when I reboot the controller to fire off this background task, i get the following Error
QuoteDisplay More41575: Socket error
Description
Task: T_AsyCube.
The specified address is invalid. The only valid addresses are any public WAN addresses or the service port address, 192.168.125.1.
Program ref: /Asycube_MAIN/Init_Cubes/SocketBind/19.
Actions
Specify a WAN address or the service port address.
Recovery: ERR_SOCK_ADDR_INVALID
So yeah, umm..... help? haha