Highspeed-counter-test on the FT TXT controller.

Ersatz- und Fremdteile, Modifikationen, etc.
Special Hints - Spare- & foreign parts, Modifications, etc.

Moderator: Jan3D

Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
fotoopa
Beiträge: 312
Registriert: 05 Okt 2017, 11:44
Wohnort: Belgie
Kontaktdaten:

Highspeed-counter-test on the FT TXT controller.

Beitrag von fotoopa » 27 Apr 2020, 20:05

Can the TXT controller really process up to 1Kh pulses.

Yes, you can if you meet the right conditions. I've been running tests for several days. Apparently, there are still many possibilities. But this setup already gives perfect results.
All common inputs barely reach 50Hz and even then sometimes with failures.
The solution is to use the motor function with control for encoder motors. You have to set them in distance mode. This example shows that you can process the fast pulses and once you reach the preset number you can give a signal through the outputs or through the I2C connection. Resetting for a new cycle can also be done with new data. The motor itself is not connected, only its counter input is used.
In order to achieve 1 Kz, you must meet the following requirement:
Pulse on time min. 800 us.
period min. 1,000us

When you have received the number of pulses the measurement stops and you can give an ouput signal or use a signal for your further program run. The basic task remains active during the measurement so you can also control other functions. The end of the measurement is done via a separate task.

I performed the tests via a hardware adjustable pulse generator ( into my FPGA chip) within the robopro program. To check the correctness, I also measure the number of pulses separately via hardware. This way I know exactly whether the correct number of pulses measured in the software is correct. The hardware generator can be set and controlled via the I2C connection. You may change the speed of the pulses as long as the minimum on time stays at 800 us. With the pulse generator I can give pulse per pulse until the number is reached. Then you immediately see that the program also reacts actively when the set impulses are reached.

For the time being I have no solution to display the number of already received pulses on the screen while the pulses are coming in. My test setup shows those impulses but they are via the hardware counters of the FPGA chip which are read back into the TXT controller via I2C. Another limitation is the time it takes for the TXT controller to send out a signal once the number of pulses has been reached. This is quickest via the I2C connection with a time between 2 and 5 task swith times (task swith is about 5 ms). If you use an output on the TXT like a lamp output then the delay is longer and also more uncertain. On average it is 2 task times longer but it can also be even more. Via the I2C it is more stable. If you use a variable within the robopro program, the processing will be faster. But if you want to change something externally you always have the delay.

The practical usefulness of this test is that you can measure very short impulses up to 1000 Hz. All other inputs cannot do this. This test setup gives no errors, even if you measure more than 25000 pulses several times.

Bild

UHD image on Flickr: https://www.flickr.com/photos/fotoopa_hs/49825796398

2 sub routines:
https://www.flickr.com/photos/fotoopa_hs/49825796348
https://www.flickr.com/photos/fotoopa_hs/49825796318

Frans.

Antworten