Jump to content
OMRON Forums

use a ADC_IN[n] to read Analog of PC Joystick


CVillaleiva

Recommended Posts

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Guest
This topic is now closed to further replies.

×
×
  • Create New...