8/6/2020 11:03 AM | |
Joined: 4/28/2015 Last visit: 2/9/2021 Posts: 9 Rating:
|
Bonjour le forum, Je cherche à utiliser ( pour la première fois) un compteur rapide pour faire l'acquisition d'un codeur incrémental rotatif qui en fonction d'une entrée (DIR)compte ou décompte les impulsions. Merci de votre aide. Hello the forum, I am trying to use (for the first time) a fast counter to acquire a rotary incremental encoder which, depending on an input (DIR) counts or counts the pulses. I applied an example given in the Siemens support but I stumbled on understanding how it works and suddenly don't know how to modify it (I may have programmed it incorrectly) to do the countdown. Thank you for your help. Hallo das Forum, Ich versuche (zum ersten Mal) einen schnellen Zähler zu verwenden, um einen Dreh-Inkrementalgeber zu erhalten, der abhängig von einem Eingang (DIR) die Impulse zählt oder zählt. Ich habe ein Beispiel aus dem Siemens-Support angewendet, bin aber auf das Verständnis gestoßen, wie es funktioniert, und weiß plötzlich nicht mehr, wie ich es ändern soll (ich habe es möglicherweise falsch programmiert), um den Countdown durchzuführen. Danke für Ihre Hilfe. AttachmentCompteur rapide.zip (407 Downloads) |
Last edited by: Jen_Moderator at: 08/06/2020 12:42:15Edited text for better reading. |
|
8/6/2020 4:41 PM | |
Joined: 4/28/2015 Last visit: 2/9/2021 Posts: 9 Rating:
|
Hello qwazee, I followed your remarks but I have random behaviors! Let me explain, the direction of counting according to the value 1 or -1 is not always taken into account! the increment is sometimes always in the same direction. I even added a delay between the change of direction (1 to -1) and the start of motor control. But nothing helps the counter remains in incrementation (Counting). Besides, I cannot force the value of the counter to zero? I manage to load the value when switching from run to stop, but no reset! I placed the last modified program. Thank you for your precious help and welcome AttachmentCompteur rapide V2.zip (405 Downloads) |
Last edited by: Dmme367 at: 08/06/2020 16:45:09 |
|
8/7/2020 11:47 AM | |
Joined: 4/28/2015 Last visit: 2/9/2021 Posts: 9 Rating:
|
The modifications made allow correct operation of the counting direction without loss of point! On the other hand, the reset is taken into account with the CV1 true, but the value of the HSC is not modified it remains unchanged! In addition, when CV1 returns to FALSE, the value fluctuates like an unconnected analog input! On the little video we can see this. In any case, thank you for your help. I take small steps, starting with this function. Cordially AttachmentVideo compteur rapide.zip (425 Downloads) |
Follow us on