03-09-2017 05:04 AM
Hello everyone !
I am working on a test bench for electric bike with an motor of servotronix "FPRO-0132 Has" and a drive "CDHD" (communication RS232, full duplex and ASCII character).
I would like to read the real time speed on my engine with labview. But there is always a delay between my real speed and the speed that is display by labview, as if labview stored the data and showed them to me with a delay. Or maybe there is a filter which makes a kind of average of speeds ?
When I press "Run", I read the good value of speed but after a short time there is again a Delay on the speed value.
Could you help me?
you will find attached my labview script.
Thank you in advance for your advice!
Note : if I wish to read the speed it is to be able to extract the numerical value of this one. And use this value to calculate the real time couple which I have to apply.
Solved! Go to Solution.
03-09-2017 04:30 AM
Bonjour à tous !
Je suis actuellement en train de réaliser un banc d'essai pour vélo électrique avec un moteur servotronix "FPRO-0132 A" et un drive "CDHD" (communication RS232, full duplex, caractère ASCII).
Je voudrais lire la vitesse en temps réel sur mon moteur. Mais j'ai toujours du retard dans ma lecture, comme si labview stockait les données et me les affichait avec un délai. Ou peut-être y a-t-il un filtre qui fait une sorte de moyenne des vitesses ?
À l'instant où j'appuie sur « Run », je lis la bonne valeur de vitesse mais après il y a de nouveau un Delay apparaît.
Seriez-vous m’éclairer ?
Merci d'avance pour vos conseils !
Remarque : si je souhaite lire la vitesse c'est pour pouvoir extraire la valeur numérique de celle-ci. Et réutilisait cette valeur pour calculer le couple en temps réel que je dois appliquer.
03-09-2017 08:35 AM
There are a number of problems with your code. One is that you might not be using VISA (serial) communications efficiently. Look at the instructions for your Device -- it probably says that data that it returns to you has a "termination character" (often a Line Feed, 0A in hex). If that is the case, you need to configure your VISA port to use the Termination Character that you specify for reads.
Most VISA systems, after you give a Command, return a response. Assuming yours works this way, do the following:
Now, consider the speed. You are running at 115200 Baud, let's say 10,000 characters/second. Suppose your command is 10 characters, and the response is 10 characters, and suppose your device takes 10 msec to respond. The entire process of Command/Response is 12 msec, or about 80 Hz, pretty fast for a serial device.
Bob Schor
03-09-2017 10:25 AM
Thank you Bob schor, it works now !!, it was a "termination character" problem indeed.