Hello all!
I'm trying to configure an ethernet IP scanner connection using KAREL only.
I've manage to replicate the adapter settings using SET_VAR, but can't set up the scanner info, such as vendor, product code or Out assembly instance and in assembly instance.
Does anyone have any clue?
Fanuc Ethernet/IP configuration over Karel
-
22Actuators -
March 5, 2025 at 3:38 PM -
Thread is Resolved
-
- Go to Best Answer
-
Look in SYSEIP.VA,
this is my setup for ethernet/ip slot 2
-
Sorry,
I forgot to add some further context.
I've tried to Set_Var with both EIP_SC[1].$Vendor and $PX_Vendor, but it refuses to assign to them that way.
I thought they were read only.
it's the same for the rest of the variables in the EIP SC.
Can I edit the .va directly? -
-
- Best Answer
Just for a test, I tried using the conventional Karel Set_Var built-in procedure:
CodePROGRAM KCL_TEST %ENVIRONMENT kclop VAR status: INTEGER vendor_int: INTEGER BEGIN --SET_VAR Direct vendor_int = 789 SET_VAR(1, '*system*', '$EIP_SC[1].$VENDOR', vendor_int, status) END kcl_test
I had no issues changing the variables this way either. Could you post your code that is failing?
-
22Actuators
March 6, 2025 at 9:02 AM Selected a post as the best answer. -
Just for a test, I tried using the conventional Karel Set_Var built-in procedure:
CodePROGRAM KCL_TEST %ENVIRONMENT kclop VAR status: INTEGER vendor_int: INTEGER BEGIN --SET_VAR Direct vendor_int = 789 SET_VAR(1, '*system*', '$EIP_SC[1].$VENDOR', vendor_int, status) END kcl_test
I had no issues changing the variables this way either. Could you post your code that is failing?
Thank you!
As it turns out, when I was comparing my code with yours, it appears that I dropped a * after *system and never noticed.