Broken wire, twinCAT

Hey guys. I'm developing a system that will sound an alarm if the wire of the encoder is broken. I am talking about sin/cos encoder, and i haven't done it yet but i made a test sin and 90 degrees shifted cos signal so i can test my idea. I want to ask about the condition in which i should sound the alarm of broken wire. Here's my code, and my condition is SINUS = COSINUS. Is that right or i should make sinus+cosinus=sinus or sinus+cosinus=cosinus or sinus+cosinus=0 THEN break wire, and why? Thank you :)

Untitled.png
 
Im actually trying to find the situation when the wire is broken. if one wire is broken, sin or cos, depend which line do we break is turned to 0 while the cable is broken .... so at some point sin will be equal to cos, that is the point when i realise that the wire is broken or cut... Why is this wrong and how would i use pytaghoras? Thanks and sorry for bothering you.
 
Sorry for a late reply. Check first that your encoder doesn't have this functionality already. I am working with one that has a "fault" wire output for when it senses such a discrepancy between the A & B quadrature signals.
 
for one you dont know at wirebreak if input goes to 0 as the input has high impedance.
You will have to make your calcs with sin*sin+cos*cos > 0.9, whenever lower the circuit has a problem.
 

Similar Topics

Good afternoon forum members. We recently had a fuse blow on the wiring between a 1756-OF6CI analog out card and a control valve (which we have...
2
Replies
3,598
Views
Dear All, I am facing problem while opening the plc main program, the message shows and error that no valid license found. but the Automation LM...
6
Replies
3,246
Views
My company recently went from a NA/login to INT/login, since the migration I was able to use spreadsheet view once in In-Sight Explorer 5.6.1. Now...
0
Replies
896
Views
I had ActiveX ListBox objects in my FT View SE application and they worked great. We then added a new HMI workstation and on that station the...
1
Replies
1,648
Views
Top