Using SimpleMotion scope capture feature

From Granite Devices Knowledge Wiki
Revision as of 10:37, 25 August 2017 by Tero K (Talk | contribs) (Created page with "This page is written in Finnish. Translation work in progress. If you need it now, please inquire at Granite Devices support. === Initialization of parameters === *SMP_CA...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jump to: navigation, search

This page is written in Finnish. Translation work in progress. If you need it now, please inquire at Granite Devices support.

Initialization of parameters

  • SMP_CAPTURE_BUF_LENGHT - montako samplea kaapataan 1-2048

*SMP_CAPTURE_SAMPLERATE - näytteistystaajuus (tai sen jakaja). IONIllla/ATOMIlla taajuus on 20kHz/(arvo+1), eli 0=20kHz, 1=10kHz, 2=6.66kHz jne. ARGONilla taajuus alkaa 17.5kHz:stä. *SMP_CAPTURE_SOURCE - päälläolevat bitit tässä parametrissa määräävät mitä signaaleja bufferiin kaapataan, seuraavat on saavatilla kaikissa firmisversioissa (samat mitä granityssä valittavissa):

**    #define CAPTURE_TORQUE_TARGET 1     #define CAPTURE_TORQUE_ACTUAL 2     #define CAPTURE_VELOCITY_TARGET 3     #define CAPTURE_VELOCITY_ACTUAL 4     #define CAPTURE_POSITION_TARGET 5     #define CAPTURE_POSITION_ACTUAL 6     #define CAPTURE_FOLLOW_ERROR 7     #define CAPTURE_OUTPUT_VOLTAGE 8     #define CAPTURE_BUS_VOLTAGE 9     #define CAPTURE_DEBUG1 19     #define CAPTURE_DEBUG2 20 **Esim arvoksi tulee 68 (bitit 2 & 6) kanavilla CAPTURE_TORQUE_ACTUAL ja CAPTURE_POSITION_ACTUAL.

  • SMP_CAPTURE_TRIGGER - triggeri mikä käynnistää kaappauksen, vaihtoehdot (samat mitä granityssä valittavissa):

**    #define TRIG_NONE 0    #define TRIG_INSTANT 1    #define TRIG_FAULT 2    #define TRIG_TARGETCHANGE 3    #define TRIG_TARGETCHANGE_POS 4    #define TRIG_EXTERNAL_INPUT 5

  • SMP_CAPTURE_BEFORE_TRIGGER_PERCENTS - tämä tuli vasta FW versiossa 1.6.0. asettaa kaappauksen aloituksen ennen triggausta. arvo prosentteina -1000000...100. Granityt 1.13.0 voi testailla tämän toimintaa.

Reading scope data

  • Pollataan arvoa SMP_CAPTURE_STATE, arvot:

**0 - idle (kaappaus valmis tai ei vielä aloitettukaan) **1 - odottaa triggeriä **2 - kaappaus käynnissä *Kun kaappaus valmis (käynyt arvoissa !=0 ja sitten 0), ladataan data talteen:

**asetetaan SMP_CAPTURE_BUFFER_GET_ADDR = 0 **luetaan parametria SMP_CAPTURE_BUFFER_GET_VALUE yhtä monta kertaa kuin alustuksessa asetettu parametrin arvo SMP_CAPTURE_BUF_LENGHT on

***tämän luku palauttaa kaapatut samplet. jos asetettiin kaapattavaksi kanavat a, b ja c, niin luetut arvot tulevat järjestyksesä a0,b0,c0,a1,b1,c1,a2,b2,c2,a3,b3,c3.


In no event the Product Information or parts hereof shall be regarded as guarantee of conditions or characteristics. The Product Information or any part thereof may also not be regarded as a warranty of any kind. No liability of any kind shall be assumed by Author with respect to Product Information or any use made by you thereof, nor shall Author indemnify you against or be liable for any third party claims with respect to such information or any use thereof.

As content of this Wiki may be edited by user community, Granite Devices Oy or it's affiliates do not take any responsibility of the contents of this Wiki. Use information at your own risk. However, Granite Devices staff attempts to review all changes made to this Wiki and keep information trustworthy.

Without written consent, Granite Devices' Products or Intellectual Property shall not be used in situations or installations where living beings, material property, or immaterial property could be harmed by the operation, features or failures of Product. Products may only be used in a way where hazards like moving parts, electric shock, laser radiation, or fire can't be realized even if the content of this Wiki would suggest otherwise.