04-06-2021 05:39 AM - edited 04-06-2021 05:40 AM
Hello,
I read an encoder with a custom command. Now I want to reset this counter, but I can't do it.
Can somone help me?
04-06-2021 11:35 AM
Hey Christian!
let me know a bit more about your problema.
would you like to reset the counter variable in LabVIEW or inside your code running customcommand?
Since i can't see wherelse your local varible is been used, i believe you could just send 0 to the variable given certain condition using select function in comparison pallete.
if you want to reset the counter value inside your arduino logic, then you can use custom command to send a value and use the function in your firmware to reset the value.
04-08-2021 05:43 AM
Hello Jorge,
Thank you for the feedback.
Info about my problem:
The costum command counts the interrupt inputs that are connected to an encoder (Stepps). After a reference run, the counter should start again at zero.
So far I have solved it in such a way that the program is stopped after the reference run, so the counter starts again at zero, but that is not so elegant.
Unfortunately I am not able to send a command to the costum command
05-17-2021 05:43 AM
How can I reset the firmware via labview?
05-17-2021 06:22 AM
if you are using arduino, you could use a digital output to send a low signal to your reset pin in your board. remember to work around timeout serial connections, since during boot time it will be unreachable.
05-24-2021 07:53 AM
In the appendix is the complete code ... Custom Command 4 should set die "counter" to 0 ... unfortunately that doesn't work ... can someone help?
05-24-2021 01:40 PM
Hey Christian! don't give up, i want to see all those motors running!
i checked out your code, but i can't see where you insert the lastencoderValueX in your enconder value. i can see a variable named last encoded x or encodervalue x, but you are not using the 0 sent from your code to lastencoderValueX or Y or Z. am i wrong?
05-25-2021 01:13 AM
Yes, I hope it will work out the way I want... 🙂
During the initialization I set all values to 0 ... that works great ...
Now I want to use "CostuomCommand4" (CC4) to set all values to 0 at all times ... If I call CC4 via labview, the program stops ...
I was wondering if an additional reset loop is needed or if there is a specific reset command.