Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

my machine like 3d printing , and i got the issue related to how to compare the current position with the specific position in textfile .

This is my link video , I had already explained all of my program . 
https://www.youtube.com/watch?v=jnMkTM8xRr0&t=90s

 

I hope someone can help me to fix that , this is my important problem . I searched some ways to fix that . because I want to change the ON-OFF value of relay but it's not change the ON-OFF relay when the program have already run. And according to me , I heard we can use PID to control the ON - OFF relay , because I thought my problem was related to the time running of the loop so that can't be catch the exactly the specific position (that's overwhelmed the point ),  but I never tried that before. 
And the main problem is related to how to compare 2 value positions each other to change the boolean value of relay .

0 Kudos
Message 1 of 6
(2,813 Views)

Hey tihai1992,

 

It was hard for me to get an idea of how your code is structured from the video that you posted. Can you post your code in here to take a look at? Also, could you list the hardware you are using as well as the versions of LabVIEW and any other drivers you are using?

 

Cheers,

Ryan

0 Kudos
Message 2 of 6
(2,779 Views)

I will show the code in the below picture. and I already marked the red area to show the code to compare 2 of value . Could you check it to me ?

Thank you in advance

0 Kudos
Message 3 of 6
(2,762 Views)

Hey tihai1992,

 

What is your question exactly? It looks like your code is comparing the shift register values and the values from your controls, and then sets the Extrude Control to true if all of those values have a difference of less than 1000. Is that what you are trying to accomplish? What is the issue you are seeing?

 

Cheers,

Ryan

0 Kudos
Message 4 of 6
(2,748 Views)

yes. that's exactly what you thought , but i don't know why the value was not changed when we got enough the condition to change the boolean value of extrude control.

0 Kudos
Message 5 of 6
(2,742 Views)

Hey tihai1992,

 

It might be useful to make an indicator that can show the values on the wires. I'd like to see what the values are going into the comparison to make sure that they are what you expect.

 

Cheers,

Ryan C

0 Kudos
Message 6 of 6
(2,721 Views)