CVillaleiva Posted March 22, 2018 Share Posted March 22, 2018 Hi, i modify a PC Joystick to move my omnidirecctional machine, but i don´t can read the value of analog control. I load the configuration that appears in the Power Clipper Manual, but the variable ADC_In have a static value of -1. Sys.WpKey = $AAAAAAAA; // Disable Write-Protection Clipper[0].Chan[0].PackInData = 0; // Unpack Input Data all ADCs J3, J7 PTR ADCIN_1->S.IO:$900030.20.12; // ADCIN_1 J3 [bits] PTR ADCIN_2->S.IO:$900034.20.12; // ADCIN_2 J3 [bits] PTR ADCIN_3->S.IO:$900038.20.12; // ADCIN_3 J7 [bits] PTR ADCIN_4->S.IO:$90003C.20.12; // ADCIN_4 J7 [bits] pag. 34 of Power Clipper User Manual. the feedback of servo is by the enconders channel inputs and work fine. i try the other configuration that appears but without a good response. ADC1VoltsIn = ((Clipper[0].Chan[0].AdcEnc[0] >> 20) * 10 / 2048) - ADC1ZeroOffset ; ADC2VoltsIn = ((Clipper[0].Chan[0].AdcEnc[1] >> 20) * 10 / 2048) – ADC2ZeroOffset ; ADC3VoltsIn = ((Clipper[0].Chan[0].AdcEnc[2] >> 20) * 10 / 2048) – ADC3ZeroOffset ; ADC4VoltsIn = ((Clipper[0].Chan[0].AdcEnc[3] >> 20) * 10 / 2048) – ADC4ZeroOffset ; i need modify some other variable to enable the ADC_In? Thanks Link to comment Share on other sites More sharing options...
steve.milici Posted March 22, 2018 Share Posted March 22, 2018 Can you directly read the ADC raw register at: Clipper[0].Chan[0].AdcEnc, i=0,1,2,3? Verify that you have the ADC option. Link to comment Share on other sites More sharing options...
CVillaleiva Posted March 25, 2018 Author Share Posted March 25, 2018 Can you directly read the ADC raw register at: Clipper[0].Chan[0].AdcEnc, i=0,1,2,3? Verify that you have the ADC option. thanks Steve, i don´t have the option unfortunately. Link to comment Share on other sites More sharing options...
Recommended Posts