User Tools

Site Tools


plc:spindle_speed_control_through_-10v_dac_channel_et10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plc:spindle_speed_control_through_-10v_dac_channel_et10 [2017/05/22 23:24] skirillovplc:spindle_speed_control_through_-10v_dac_channel_et10 [2017/10/16 12:44] skirillov
Line 13: Line 13:
 == PLC controller (Hardware) == == PLC controller (Hardware) ==
  
-DAC offset register is mapped to address 0x32 of [[mycnc:extern_variables|Extern CNC Variables]] Area.+DAC offset register is mapped to address 0x32 of [[mycnc:extern_variables|Extern CNC Variables]] array.
 <code c>#define EXT_ET5_DAC_OFFSET 0x32</code> <code c>#define EXT_ET5_DAC_OFFSET 0x32</code>
  
Line 20: Line 20:
 high 4 bits is DAC channel high 4 bits is DAC channel
  
-Message PLCCMD_SET_CNC_EXTVAR should be sent to myCNC control core from PLC to get access [[External CNC Variables]], then 2 ms delay should be initiated to push the message from PLC to myCNC Core.+Message PLCCMD_SET_CNC_EXTVAR should be sent to myCNC control core from PLC to get access [[mycnc:extern_variables|Extern CNC Variables]], then 2 ms delay should be initiated to push the message from PLC to myCNC Core.
  
 <code c>#define PLCCMD_SET_CNC_EXTVAR 1020</code> <code c>#define PLCCMD_SET_CNC_EXTVAR 1020</code>
Line 32: Line 32:
 command=0x32;//EXT_ET5_DAC_OFFSET              //setup command register (var00) for DAC register access command=0x32;//EXT_ET5_DAC_OFFSET              //setup command register (var00) for DAC register access
 parameter=dac_value+(2<<12);                   //setup parameter register (var01), DAC channel is #2 parameter=dac_value+(2<<12);                   //setup parameter register (var01), DAC channel is #2
-texit=timer+2;do{timer++;}while(timer<texit);  //2ms delay ti push the message +texit=timer+2;do{timer++;}while(timer<texit);  //2ms delay to push the message 
 </code> </code>
  
plc/spindle_speed_control_through_-10v_dac_channel_et10.txt · Last modified: 2022/09/13 13:51 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki