So first i have to apologize because i know that what i am asking has been talked about before some years ago, but i cant seem to be able to find that topic again.
Robot: KR150L180
Control: VKRC2 running standard krc software kss4.97
So simply put i need to set 6 boolean variables in the sps after a reboot (but not a cold boot, although it probably could not hurt).
The variables are declared in the config.dat file:
BOOL Tafel_1_blok
BOOL Tafel_2_blok
BOOL Tafel_3_blok
BOOL Tafel_4_blok
BOOL Tafel_5_blok
BOOL tafel_6_blok
And in the sps i reset them based on a input.
IF NOT Tafel_1 THEN ;Tafel_1 is an input also declared in the config.dat
Tafel_1_blok = FALSE
ENDIF
;the rest of the variables 2 throug 6 are the same so to keep it short i will leave them out.
The reason why i have to set them is that during a reboot the inputs are seen as low when they are not, and so my variables get reset when they are not supposed to.
For some more background information:
These variables i use to block a table (i have 6 tables with different product around the robot) from being used. The input is connected to a limit switch on the table and detects if a product is present. So in my main program i can set the block variable to high after the robot is done milling this product, and when the product is removed the table becomes available again when a new product is put in.
So what happens is that in the morning after a reboot if there where still product inside they get milled twice and that doesn't always go well. I have to mention that the simple solution would be to not leave any product is the robot in the evening or take everything out in the morning, but people can be idiots and a robot always does what he is told. So i would put my money on the robot .
The inputs are connected through a device net module from Phoenix contact (ILB DN 24 DI16 DO16). i suspect my problems might have something to do with when the device net connection is made, but i am not sure.