Hi,
I am trying to create a BG Logic to get the ENCODER count and use that to make a logic. While running BG logic, it is giving INTP-443 error. Not sure what to do. I am new to this.
Hi,
I am trying to create a BG Logic to get the ENCODER count and use that to make a logic. While running BG logic, it is giving INTP-443 error. Not sure what to do. I am new to this.
Seems you cannot use the LINECOUNT instruction in a BG Logic program. Try to save the encoder count value in your normal TP program (must be used immediately after a part has been detected).
The ENC, is a TP program. And I call that program in BG Logic as I want continuous reading. i am not sure, how do i use TP program to run continuously
TP program to run continuously
If you want a TP program to run continuously/in the background you could look at using:
A) Background Logic - as you have just encountered, this has limited use of instructions/statements (including the LINECOUNT instruction apparently). It is possible to read out system variables into registers, though. So my advice is to research if the value you're after is also available in a system variable.
B) The RUN statement - at the start of program '1' you can start another program '2' in the background with this instruction. Note that while program 1 will continue immediately, it won't abort until program 2 is also aborted. So if you use this you will have to manually start and stop it (whereas BG logic automatically runs all the time).
Are you speaking about a line tracking application with an external encoder? you can read the encoder count value from a variable.