June 27, 2019, 08:39:10 AM
Robotforum | Industrial Robots Community

 IF signaldi how to do

normal_post Author Topic:  IF signaldi how to do  (Read 244 times)

0 Members and 1 Guest are viewing this topic.

April 16, 2019, 09:56:02 PM
Read 244 times
Offline

leevi koljonen


Hi i work in a company and im a "process operator" and i wanted to make a change in one program that would require me to write something along the lines of

IF (signaldi = 0)
<movement>
ENDIF

But when i do it and run it pp jumps to ERROR on the code at the bottom.

and im quite lost. i have tried so many different ways.

i do not want to do a while loop as that could cause a problem.

i want to check once if a signaldi is on or off and do an action of its off.

Today at 08:39:10 AM
Reply #1

Advertisement

Guest

April 17, 2019, 10:51:20 AM
Reply #1
Offline

SomeTekk


IF DInput(di_your_input)=0 THEN
Move ...
ENDIF

April 17, 2019, 11:55:24 AM
Reply #2
Offline

Lemster68

Global Moderator
There is also a function TestDI() that returns true if the signal is on.  IF TestDI(diMySignal) MoveL, etc.,

April 19, 2019, 10:52:48 AM
Reply #3
Offline

hydra


your signal name : di_Signal_1

EXP1:
IF di_Signal_1=1 THEN
       ...
ENDIF

EXP2:
IF DInput(di_Signal_1)=1 THEN
      ...
ENDIF
Think before you talk, Read it before you think about it.
-Fran Lebowitz.

-----------------------------------------------------

info@hbarobot.com
http://www.hbaotomasyon.com/en/index-en.aspx


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter