文本講義文稿說明pages_第1頁
文本講義文稿說明pages_第2頁
文本講義文稿說明pages_第3頁
文本講義文稿說明pages_第4頁
文本講義文稿說明pages_第5頁
已閱讀5頁,還剩345頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

LinuxCNC(1)TheEnhancedMachineControllerLinuxCNC(1)NAMElinuxcnc?LinuxCNC(TheEnhancedMachineController)SYNOPSISlinuxcnc[-v][-d][INIFILE]DESCRIPTIONlinuxcncisusedtostartLinuxCNC(TheEnhancedMachineController).ItstartstherealtimesystemandtheninitializesanumberofLinuxCNCcomponents(IO,Motion,GUI,HAL,etc).ThemostimportantparameterisINIFILE,whichspecifiestheconfigurationnameyouwouldliketorun.IfINIFILEisnotspecified,theLinuxCNC(1)TheEnhancedMachineControllerLinuxCNC(1)NAMElinuxcnc?LinuxCNC(TheEnhancedMachineController)SYNOPSISlinuxcnc[-v][-d][INIFILE]DESCRIPTIONlinuxcncisusedtostartLinuxCNC(TheEnhancedMachineController).ItstartstherealtimesystemandtheninitializesanumberofLinuxCNCcomponents(IO,Motion,GUI,HAL,etc).ThemostimportantparameterisINIFILE,whichspecifiestheconfigurationnameyouwouldliketorun.IfINIFILEisnotspecified,thelinuxcncscriptpresentsagraphicalwizardtoletyouchooseone.OPTIONS?v?dBealittlebitverbose.Thiscausesthescripttoprintinformationasitworks.Printlotsofdebuginformation.Allexecutedusefulwhensomethingisnotworkingasitshould.dsareechoedtothescreen.ThismodeisINIFILETheinifileisthemainpieceofanLinuxCNCconfiguration.Itisnottheentireconfiguration;therearevariousotherfilesthatgowithit(NMLfiles,HALfiles,TBLfiles,VARfiles).Itis,how-ever,themostimportantone,becauseitisthefilethatholdstheconfigurationtogether.Itcanadjustalotofparametersitself,butitalsotellslinuxcncwhichotherfilestoloadanduse.Thereareseveralwaystospecifywhichconfigtouse:Specifytheabsolutepathtoanini,e.g.linuxcnc/usr/local/linuxcnc/configs/sim/sim.iniSpecifyarelativepathfromthecurrentdirectory,e.g.linuxcncconfigs/sim/sim.iniOtherwise,inthecasewheretheINIFILEisnotspecified,thebehaviorwilldependonwhetheryouconfiguredlinuxcncwith--enable-run-in-place.Ifso,thelinuxcncconfigchooserwillsearchonlytheconfigsdirectoryinyoursourcetree.Ifnot(orifyouareusingapackagedversionoflinuxcnc),itmaysearchseveraldirectories.Theconfigchooseriscurrentlysettosearchthepath:EXAMPLESlinuxcnclinuxcncconfigs/sim/sim.inilinuxcnc/etc/linuxcnc/sample-configs/stepper/stepper_mm.iniSEEALSOhalcmd(1)MuchmoreinformationaboutLinuxCNCandHALisavailableintheLinuxCNCandHALUserManuals,foundat/usr/share/doc/linuxcnc/.LinuxCNCDocumentation2006-02-201LinuxCNC(1)TheEnhancedMachineControllerLinuxCNC(1)BUGSNoneknownatthistime.LinuxCNC(1)TheEnhancedMachineControllerLinuxCNC(1)BUGSNoneknownatthistime.AUTHORThismanpagewrittenbyAlexJoni,aspartoftheLinuxCNCEnhancedMachineControllerproject.REPORTINGBUGSReportbugstoalex_joniATusersDOTsourceforgeDOTnetCOPYRIGHTCopyright?2006AlexJoni.Thisissoftware;seethesourceforcopyingconditions.ThereisNOwarranty;notevenforMER-CHANTABILITYorFITNESSFORAPARTICULARPURPOSE.22006-02-20LinuxCNCDocumentationaxis-remote(1)TheEnhancedMachineControlleraxis-remote(1)NAMEaxis-remote?AXISRemoteInterfaceSYNOPSISaxis-remoteOPTIONS|FILENAMEDESCRIPTIONaxis-remoteisasmallscriptthattriggersaxis-remote(1)TheEnhancedMachineControlleraxis-remote(1)NAMEaxis-remote?AXISRemoteInterfaceSYNOPSISaxis-remoteOPTIONS|FILENAMEDESCRIPTIONaxis-remoteisasmallscriptthattriggersfurtherinformation.OPTIONSdsinarunningAXISGUI.Useaxis-remote--helpfor--,-pCheckwhetherAXISisrunning.--reload,-rMakeAXISreloadthecurrentlyloadedfile.--clear,-cMakeAXISclearthebackplot.--quit,-qMakeAXISquit.--help,-h,-?Displayalistofvalidparametersforaxis-remote.--mdiD,-mRuntheMDIDdD.FILENAMELoadtheG-codefileFILENAME.SEEALSOaxis(1)MuchmoreinformationaboutLinuxCNCandHALisavailableintheLinuxCNCandHALUserManuals,foundat/usr/share/doc/linuxcnc/.HISTORYBUGSNoneknownatthistime.AUTHORThismanpagewrittenbyAlexJoni,aspartoftheLinuxCNCproject.REPORTINGBUGSReportbugstoalex_joniATusersDOTsourceforgeDOTnetCOPYRIGHTCopyright?2007AlexJoni.Thisissoftware;seethesourceforcopyingconditions.ThereisNOwarranty;notevenforMER-CHANTABILITYorFITNESSFORAPARTICULARPURPOSE.LinuxCNCDocumentation2007-04-013AXIS(1)TheEnhancedMachineControllerAXIS(1)NAMEaxis?AXISLinuxCNCGraphicalUserInterfaceSYNOPSISaxis-iniINIFILEDESCRIPTIONaxisAXIS(1)TheEnhancedMachineControllerAXIS(1)NAMEaxis?AXISLinuxCNCGraphicalUserInterfaceSYNOPSISaxis-iniINIFILEDESCRIPTIONaxisisoneoftheGraphicalUserInterfaces(GUI)forLinuxCNCItgetsrunbytherunscriptusually.OPTIONSINIFILETheinifileisthemainpieceofanLinuxCNCconfiguration.Itisnottheentireconfiguration;therearevariousotherfilesthatgowithit(NMLfiles,HALfiles,TBLfiles,VARfiles).Itis,how-ever,themostimportantone,becauseitisthefilethatholdstheconfigurationtogether.Itcanadjustalotofparametersitself,butitalsotellsLinuxCNCwhichotherfilestoloadanduse.SEEALSOLinuxCNC(1)MuchmoreinformationaboutLinuxCNCandHALisavailableintheLinuxCNCandHALUserManuals,foundat/usr/share/doc/LinuxCNC/.HISTORYBUGSNoneknownatthistime.AUTHORThismanpagewrittenbyAlexJoni,aspartoftheLinuxCNCproject.REPORTINGBUGSReportbugstoalex_joniATusersDOTsourceforgeDOTnetCOPYRIGHTCopyright?2007AlexJoni.Thisissoftware;seethesourceforcopyingconditions.ThereisNOwarranty;notevenforMER-CHANTABILITYorFITNESSFORAPARTICULARPURPOSE.42007-04-01LinuxCNCDocumentationLinuxCNC(1)LinuxCNC(1)NAMEelbpcom?CommunicatewithMesaethernetcardsSYNOPSISCommonoptions:elbpcom[--ip=IP][--port=PORT][--timeout=TIMEOUT]ingdata:--space=SPACE[--info]--address=ADDRESS--=LinuxCNC(1)LinuxCNC(1)NAMEelbpcom?CommunicatewithMesaethernetcardsSYNOPSISCommonoptions:elbpcom[--ip=IP][--port=PORT][--timeout=TIMEOUT]ingdata:--space=SPACE[--info]--address=ADDRESS--=LENGTHWritingdata:--address=ADDRESS--write=HEXDATASendingarbitrarypackets:elbpcom[commonoptions]HEXDATADESCRIPTIONorwritedatafromaMesaethernetcardthatusestheLBP16protocol,suchasthe7i80.Thiscanbeusefulforperforcertainlow-leveltasks.Formoreinformationaboutthemeaningofeachaddressspace,seethecarddocumentation.Incorrectuseofthisutilitycanhavenegativeeffectssuchaschangingth’sIPaddressorevencorruptingtheFPGAbitfileintheeeprom.Forsometasks,suchasupdatingFPGAbitfilesandsettingIPaddresses,mesaflash(1)isamoreappropriatetool.Ifnotspecified,thedefaultvaluesare--ip=--port=27181--timeout=.2ThisexampledemonstratesingtheHOSTMOT2identifyingstringfromtheIDROMinspace0:$elbpcom--space0--address0x104-->82420401<484f53544d4f5432HOSTMOT28Firsttherequestisshowninhex.Thentheresponse(ifany)isshowninhex.Finally,theresponseisshowninASCII,with"."replacinganynon-ASCIIcharacters.Thisissimilartothefollowinginvocationsofmesaflash:$./mesaflash--device7i80--rpo0x10454534F48$./mesaflash--device7i80--rpo0x10832544F4Dbutnoticeitsdifferenttreatmentofbyteorder.SEEALSOhm2_eth(9),Mesa’sdocumentationfortheAnythingI/Oboards.LinuxCNCDocumentation2015-04-185GLADEVCP(1)TheEnhancedMachineControllerGLADEVCP(1)NAMEgladevcp?VirtualControlPanelforLinuxCNCbasedonGlade,GtkGLADEVCP(1)TheEnhancedMachineControllerGLADEVCP(1)NAMEgladevcp?VirtualControlPanelforLinuxCNCbasedonGlade,GtkandHALwidgetsSYNOPSISgladevcp[-gWxH+X+Y][-ccomponent-name][-uhandler][-Uuseroption][-Hhalfile][-d]myfile.uiOPTIONS-gWxH+X+YThissetstheinitialgeometryoftherootwindow.Use’WxH’forjustsize,’+X+Y’forjustposi-tion,or’WxH+X+Y’forboth.Size/positionusepixelunits.Positionisreferencedfromtopleft.-ccomponent-nameUsecomponent-nameastheHALcomponentname.Ifthecomponentnameisnotspecified,thebasenameoftheuifileisused.-uhandlerInstructsgladevcptoinspectthenalsintheuifile.-Uuseroptionscripthandlerforeventhandlers,andconnectthemtosig-gladevcpcollectsalluseroptionstringsandpassesthemtothehandlerinit()methodasalistofstringswithoutfurtherinspection.-xXIDReparentgladevcpintoanexistingwindowXIDinsteadofcreatinganewtoplevelwindow.-HhalfileofHALcomponentisfinalized.ds-byexecutinghalcmd-chalfileaftertheHAL-denabledebugoutput.-Rgtkrcfileexplicitlyloadagtkrcfile.-tTHEMEsetgtktheme.Defaultissystemtheme.Differentpanelscanhavedifferentthemes.-mUMforcepanelwindowtomaxumize.Togetherwiththe-ggeometryoptiononecanmovethepaneltoasecondmonitorandforceittouseallofthescreen-Rexplicitlydeactivateworkaroundforagtkbugwhichmakesmatchesofwidgetandwidget_classmatchesingtkthemeandgtkrcfilesfail.Normallynotneeded.SEEALSOGladeVCPintheLinuxCNCdocumentationforadescriptionofgladevcp’scapabilitiesandtheassociatedHALwidgetset,alongwithexamples62010-12-20LinuxCNCDocumentationgs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)NAMEgs2_vfd-HALuserspacecomponentgs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)NAMEgs2_vfd-HALuserspacecomponentforAutomationDirectGS2VFD’sSYNOPSISgs2_vfd[OPTIONS]DESCRIPTIONThismanualpageexplainsthegs2_vfdcomponent.Thiscomponentbusconnection.gs2_vfdisforusewithLinuxCNCsandwritestotheGS2viaamod-OPTIONS-b,--bits<n>(default8)Setnumberofdatabitsto<n>,wherenmustbefrom5to8inclusive-d,--device<path>(default/dev/ttyS0)Setthenameoftheserialdevicenodetouse.-v,--verboseTurnonverbosemode.-g,--debugTurnondebugmessages.Notethatifthereareserialerrors,thismaybecomeannoying.Debugmodewillcauseallmodbusmessagestobeprintedinhexontheterminal.-n,--name<string>(defaultgs2_vfd)SetthenameoftheHALmodule.TheHALcompnamewillbesetto<string>,andallpinandparameternameswillbeginwith<string>.-p,--parity[even,odd,none](defaultodd)Setserialparitytoeven,odd,ornone.-r,--rate<n>(default38400)Setbaudrateto<n>.Itisanerroriftherateisnotoneofthefollowing:110,300,600,1200,2400,4800,9600,19200,38400,57600,115200-s,--stopbits[1,2](default1)Setserialstopbitsto1or2-t,--target<n>(default1)SetMODBUStarget(slave)number.ThismustmatchthedevicenumberyousetontheGS2.-A,--accel-seconds<n>(default10.0)Secondstoacceleratethespindlefrom0toMaxRPM.-D,--decel-seconds<n>(default0.0)SecondstodeceleratethespindlefromMaxRPMto0.Ifsetto0.0thespindlewillbeallowedtocoasttoastopwithoutcontrolleddeceleration.-R,--braking-resistorThisargumentshouldbeusedwhenabrakingresistorisinstalledontheGS2VFD(seeAppendixAoftheGS2manual).Itdisablesdecelerationover-voltagestallprevention(seeGS2modbusParameter6.05),allowingtheVFDtokeepbrakingeveninsituationswherethemotorisregener-atinghighvoltage.Theregeneratedvoltagegetssafelydumpedintothebrakingresistor.PINSGS2VFDJanuary1,20097gs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)<name>.DC-bus-volts(float,out)fromtheVFD<name>.at-speed(bit,out)whendriveisat<name>.err-reset(bit,gs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)<name>.DC-bus-volts(float,out)fromtheVFD<name>.at-speed(bit,out)whendriveisat<name>.err-reset(bit,in)reseterrorssenttoVFDdedspeed<name>firmware-revision(s32,out)fromtheVFD<name>frequency-fromtheVFDd(float,out)<name>frequency-out(float,out)fromtheVFD<name>is-stopped(bit,out)whentheVFDreports0Hzoutput<name>load-percentage(float,out)fromtheVFD<name>motor-RPM(float,out)fromtheVFD<name>.output-current(float,out)fromtheVFD<name>.output-voltage(float,out)fromtheVFD<name>.power-factor(float,out)fromtheVFD<name>.scale-frequency(float,out)fromtheVFD<name>.speed-d(float,in)speedsenttoVFDinRPMItisanerrortosendaspeedfasterthantheMotorMaxRPMassetintheVFD<name>.spindle-fwd(bit,in)1forFWDand0forREVsenttoVFD<name>.spindle-on(bit,in)1forONand0forOFFsenttoVFD,onlyonwhenrunning<name>.spindle-rev(bit,in)1forONand0forOFF,onlyonwhenrunning<name>.status-1(s32,out)DriveStatusoftheVFD(seetheGS2manual)<name>.status-2(s32,out)DriveStatusoftheVFD(seetheGS2manual)Notethatthevalueisasumofallthebitsthatareon.Soa163whichmeansthedriveisintherunmodeisthesumof3(run)+32(freqsetbyserial)+128(operationsetbyserial).PARAMETERS<name>.error-count(s32,RW)8January1,2009GS2VFDgs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)<name>loop-time(float,RW)howoftengs2_vfd(1)LinuxCNCDocumentationgs2_vfd(1)<name>loop-time(float,RW)howoftenthemodbusispolled(default0.1)<name>nameplate-HZ(float,RW)NameplateHzofmotor(default60)<name>nameplate-RPM(float,RW)NameplateRPMofmotor(default1730)<name>retval(s32,RW)thereturnvalueofanerrorinHAL<name>.tolerance(float,RW)speedtolerance(default0.01)<name>.ack-delay(s32,RW)numberof/writecyclesbeforecheckingat-speed(default2)SEEALSOGS2DriverintheLinuxCNCdocumentationforafulldescriptionoftheGS2syntaxGS2ExamplesintheLinuxCNCdocumentationforexamplesusingtheGS2componentBUGSAUTHORJohnThorntonLICENSEGPLGS2VFDJanuary1,20099HAL_INPUT(1)HALUser’sManualHAL_INPUT(1)NAMEhal_input?controlHALpinswithHAL_INPUT(1)HALUser’sManualHAL_INPUT(1)NAMEhal_input?controlHALpinswithanyLinuxinputdevice,includingUSBHIDdevicesSYNOPSISloadusrhal_input[-KRAL]inputspec...DESCRIPTIONhal_inputisaninterfacebetweenHALandanyLinuxinputdevice,includingUSBHIDdevices.Foreachdevicenamed,hal_inputcreatespinscorrespondingtoitskeys,absoluteaxes,andLEDs.Atafixedrateofapproximately10ms,itsynchronizesthedeviceandtheHALpins.SPECIFICATIONTheinputspecmaybeinoneofseveralforms:AstringSAsubstringorshell-stylepatternmatchwillbetestedthe"name"ofthedevice,the"phys"(whichgivesinformationabouthowitisconnected),andthe"id",whichisastringoftheform"Bus=...Vendor=...Product=...Version=...".Youcanviewthename,phys,andidofattacheddevicesbyexecutingless/proc/bus/input/devices.Examples:SpaceBallserio*/input0AnumberNThisopens/dev/input/eventN.Exceptfordevicesthatarealwaysattachedtothesystem,thisnumbermaychangeoverrebootsorwhenthedeviceisremoved.Forthisreason,usinganintegerisnotrecommended.Whenseveraldevicesareidentifiedbythesamestring,add":N"whereNistheindexofthedesireddevice.Forexample,ifMousematchesinput3andinput10,thenMouseandMouse:0selectinput3.Specifyingmouse:1selectsinput10.Fordevicesthatappearasmultipleentriesin/dev/input,theseindicesarelikelytostaythesameeverytime.Formultipleidenticaldevices,theseindicesarelikelytodependontheinsertionorder,butstaythesameacrossrebootsaslongasthedevicesarenotmovedtodifferentportsorunpluggedwhilethemachineisbooted.Ifthefirstcharacteroftheinputspecisa"+",thenhal_inputrequestsexclusiveaccesstothedevice.Thefirstdevicematchinganinputspecisused.Anynumberofinputspecsmaybeused.Asubsetoptionmaypreceedeachinputspec.Thesubsetoptionbeginswithadash.Eachletterinthesub-setoptionspecifiesadevicefeaturetoinclude.Featuresthatarenotspecifiedareexcluded.Forinstance,toexportkeyboardLEDstoHALwithoutexportingkeys,usehal_input-Lkeyboard...????EV_KEY(buttonsandkeys).Subset-KEV_ABS(absoluteanaloginputs).Subset-AEV_REL(relativeanaloginputs).Subset-REV_LED(LEDoutputs).Subset-LHALPINSANDPARAMETERSForbuttonsinputN.btn-namebitoutinputN.btn-name-notbitoutCreatedforeachbuttononthedevice.102007-02-25LinuxCNCDocumentationHAL_INPUT(1)HALUser’sManualHAL_INPUT(1)ForkeysinputNkey-nameinputNkey-name-notHAL_INPUT(1)HALUser’sManualHAL_INPUT(1)ForkeysinputNkey-nameinputNkey-name-notCreatedforeachkeyonthedevice.ForabsoluteaxesinputN.abs-name-countss32outinputN.abs-name-positionfloatoutinputN.abs-name-scaleparameterfloatrwinputN.abs-name-offsetparameterfloatrwinputN.abs-name-fuzzparameters32rwinputN.abs-name-flatparameters32rwinputN.abs-name-minparameters32rinputN.abs-name-maxparameters32rCreatedforeachabsoluteaxisonthedevice.Devicepositionsrthanflattooffsetarereportedasoffsetincounts,andcountsdoesnotchangeuntilthedevicepositionchangesbyatleastfuzz.Thepositioniscomputedasposition=(counts-offset)/scale.Thedefaultvalueofscaleandoffsetmaptherangeoftheaxisreportedbytheoperatingsystemto[-1,1].Thedefaultvaluesoffuzzandflatarethosereportedbytheoperatingsystem.Thevaluesofminandmaxarethosereportedbytheoperatingsystem.ForrelativeaxesinputNrel-name-countss32outinputNrel-name-positionfloatoutinputNrel-name-resetbitininputNrel-name-scaleparameterfloatrwinputNrel-name-absoluteparameters32rwinputNrel-name-precisionparameters32rwinputNrel-name-lastparameters32rwCreatedforeachrelativeaxisonthedevice.Aslongasresetistrue,countsisresettozeroregardlessofanypastorcurrentaxismovement.Otherwise,countsincreasesordecreasesaccord-ingtothemotionoftheaxis.countsisdividedbyposition-scaletogiveposition.Thedefaultvalueofpositionis1.Therearesomedevices,notablyscrollwheels,whichreturnsignedvalueswithlessresolutionthan32bits.Thedefaultvalueofprecisionis32.precisioncanbesetto8foradevicethatreturnssigned8bitvalues,oranyothervaluefrom1to32.absolute,whensettrue,ignoresduplicateeventswiththesamevalue.Thisallowsfordevicesthatrepeateventswith-outanyuseractiontoworkcorrectly.lastshowsthemostrecentcountvaluereturnedbythedevice,andisusedintheimplementationofabsolute.ForLEDsinputNled-namebitoutinputNled-name-invertparameterbitrwCreatedforeachLEDonthedevice.PERMISSIONSANDUDEVBydefault,theinputdevicesmaynotbeaccessibletoregularusers--hal_inputrequires-writeaccess,evenifthedevicehasnooutputs.Tochangethedefaultpermissionofadevice,addanewfileto/etc/udev/rules.dtosetthedevice’sGROUPto"plugdev".Youcandothisforallinputdeviceswiththisrule:SUBSYSTEM=="input",MODE="0660",GROUP="plugdev"Youcanalsomakemorespecificrulesforparticulardevices.Forinstance,aSpaceBallinputdeviceusesthe’spaceball’kernelmodule,soaudeventryforitwould:DRIVER=="spaceball",MODE="0660",GROUP="plugdev"thenexttimethedeviceisattachedtothesystem,itwillbeaccessibletothe"plugdev"group.ForUSBdevices,theudevlinewouldrefertothedevice’sVendorandProductvalues,suchasSYSFS{idVendor}=="046d",MODE="0660",GROUP="plugdev"LinuxCNCDocumentation2007-02-2511HAL_INPUT(1)HALUser’sManualHAL_INPUT(1)foraparticularlogictech-brandmouse.FormoreHAL_INPUT(1)HALUser’sManualHAL_INPUT(1)foraparticularlogictech-brandmouse.Formoreinformationonwritingudevrules,seeudev(8).BUGSTheinitialstateofkeys,buttons,andabsoluteaxesareerroneouslyreportedasFALSEor0untilaneventisreceivedforthatkey,button,oraxis.SEEALSOudev(8)122007-02-25LinuxCNCDocumentationHALCMD(1)HALUser’sManualHALCMD(1)NAMEhalcmd?manipulatetheLinuxCNCHALfromthedlineSYNOPSIShalcmd[OPTIONS]DESCRIPTIOND[ARG]]halcmdisusedtomanipulatetheHAL(HardwareAbstractionLayer)fromthedline.halcmdcanoptionallyd.dsfromafile,allowingcomplexHALconfigurationstobesetupwithasingleIfthelinelibraryisavailablewhenLinuxCNCiscompiled,thenhalcmdoffersdlineeditingds,HALCMD(1)HALUser’sManualHALCMD(1)NAMEhalcmd?manipulatetheLinuxCNCHALfromthedlineSYNOPSIShalcmd[OPTIONS]DESCRIPTIOND[ARG]]halcmdisusedtomanipulatetheHAL(HardwareAbstractionLayer)fromthedline.halcmdcanoptionallyd.dsfromafile,allowingcomplexHALconfigurationstobesetupwithasingleIfthelinelibraryisavailablewhenLinuxCNCiscompiled,thenhalcmdoffersdlineeditingds,andpresstabtoandcompletionwhenrunninginteractively.Usetheuparrowtorecallpreviouscompletethenamesofitemssuchaspinsandsignals.OPTIONS-IBeforetearingdowntherealtimeenvironment,runaninteractivehalcmd.halrunonly.If-Iisused,itmustprecedeallotherdlinearguments.fileinstead.Iffileisnotspecified,takeinput?f[file]Ignorestdin.dson-iinifileSeeSUBSTITUTIONbelow.?kKeepgoingafterfailedfails.displayerrorsonly(default)displaynothing,executed(s).Thedefaultistostopandreturnfailureifanyd?q?Q?sdssilentlyScript-friendlymode.Inthismode,showwillnotoutputtitlesfortheitemsshown.Also,modulenameswillbeprintedinsteadofIDcodesinpin,param,andfunctlistings.Thsareprintedonasingleline,withthethperiod,FPusageandnamefirst,followedbyallofthefunctionsintheth,inexecutionorder.Signalsareprintedonasingleline,withthetype,value,andsignalnamefirst,followedbyalistofpinsconnectedtothesignal,showingboththedirectionandthepinname.-RReleasetheHALmutex.ThisisusefulforrecoveringwhenaHALcomponenthascrashedwhileholdingtheHALmutex.?v?V?h[displayresultsofeachdisplaylotsofdebuggingjunkd]ddisplayahelpscreenandexit,displaysextendedhelpondifspecifiedDSdstellhalcmdwhattodo.Normallyhalcmdsasingledfromthedlineandexecutesit.Ifthe’-f’optionisusedtodsfromafile,halcmdseachlineofthefileasanewd.Anythingfollowing’#’onalineisacomment.loadrtmodname(loadrealtimemodule)LoadsarealtimeHALmodulecalledmodname.halcmdlooksforthemoduleinadirectoryspecifiedatcompiletime.Insystemswithrealtime,halcmdcallsthelinuxcnc_module_helpertoloadrealtimemodules.linuxcnc_module_helperisasetuidprogramandiscompiledwithawhitelistofmodulesitisallowedtoload.ThisiscurrentlyjustalistofLinuxCNC-relatedmodules.Thelinuxcnc_mod-ule_helperexecsinsmod,soreturncodesanderrormessagesarethosefrominsmod.Administra-torswhowishtorestrictwhichuserscanloadtheseLinuxCNC-relatedkernelmodulescandothisLinuxCNCDocumentation2003-12-1813HALCMD(1)HALUser’sManualHALCMD(1)bysettingthepermissionsandgrouponlinuxcnc_module_helperappropriately.Insystemswithoutrealtimehalcmdcallsthertapi_appwhichcreatesthesimulatedrealtimeenvironmentifitdidnotyetexist,andthenloadstherequestedcomponentwithacalltodlopen(3).unloadrtmodname(unloadrealtimemodule)HALCMD(1)HALUser’sManualHALCMD(1)bysettingthepermissionsandgrouponlinuxcnc_module_helperappropriately.Insystemswithoutrealtimehalcmdcallsthertapi_appwhichcreatesthesimulatedrealtimeenvironmentifitdidnotyetexist,andthenloadstherequestedcomponentwithacalltodlopen(3).unloadrtmodname(unloadrealtimemodule)UnloadsarealtimeHALmodulecalledmodname.Ifmodnameis"all",itwillunloadallcurrentlyloadedrealtimeHALmodules.unloadrtalsoworksbyexecinglinux-cnc_module_helperorrtapi_app,justlikeloadrt.loadusr[flags]unix-d(loadUserspacecomponent)Executesthegivenunix-ponent.[flags]maybeoneormoreof:d,usuallytoloadauserspacecom-?-Wtowaitforthecomponenttobecome y.Thecomponentisassumedtohavethesamenameasthefirstargumentofthed.???-Wnnametowaitforthecomponent,whichwillhavethegivenname.-wtowaitfortheprogramtoexit-itoignoretheprogramreturnvalue(with-w)waitusrname(waitforUserspacecomponent)WaitsforuserspacecomponentnametodisconnectfromHAL(usuallyonexit).Thecomponentmustalybeloaded.UsefullneartheendofaHALfiletowaituntiltheuserunloadusrcompnamessomeuserinterfacecomponentbeforecleaningupandexiting.(unloadUserspacecomponent)Unloadsauserspacecomponentcalledcompname.Ifcompnameis"all",itwillunloadalluserspacecomponents.unloadusrworksbysendingSIGTERMtoalluserspacecomponents.unloadcompnameUnloadsauserspacecomponentorrealtimemodule.Ifcompnameis"all",itwillunloadalluserspacecomponentsandrealtimemodules.newsigsignametype(OBSOLETE-usenetinstead)(newsignal)CreatesanewHALsignalcalledsignamethatmaylaterbeusedtoconnecttwoormoALcomponentpins.typeisthedatatypeofthenewsignal,andmustbeoneof"bit","s32","u32",or"float".Failsifasignalofthesamenamealexists.ydelsigsigname(deletesignal)DeletesHALsignalsigname.Anypinscurrentlylinkedtothesignalwillbeunlinked.Failsifsignamedoesnotexist.setssignamevalue(setsignal)Setsthevalueofsignalsignametovalue.Failsifsignamedoesnotexist,ifitalhasawriter,orifvalueisnotalegalvalue.Legalvaluesdependonthesignals’stype.stypename(signaltype)Getsthetypeofsignalname.Failsifnamedoesnotexistasasignal.getssigname(getsignal)Getsthevalueofsignalsigname.Failsifsignamedoesnotexist.linkpspinname[arrow]signame(OBSOLETE-usenetinstead)(linkpintosignal)EstablishsalinkbetweenaHALcomponentypinpinnameandaHALsignalsigname.Anypreviouslinktopinnamewillbebroken.arrowcanbe"=>","<=","<=>",oromitted.halcmdignoresarrows,buttheycanbeusefulinfilestodocumentthedirectionofdataflow.Arrowsshouldnotbeusedontheddlinesince142003-12-18LinuxCNCDocumentationHALCMD(1)HALUser’sManualHALCMD(1)theshellmighttrytointerpretthem.Failsifeitherpinnameorsignamedoesnotexist,oriftheyarenotthesametypetype.linkspsigname[arrow]pinname(OBSOLETE-usenetinstead)(linksignalHALCMD(1)HALUser’sManualHALCMD(1)theshellmighttrytointerpretthem.Failsifeitherpinnameorsignamedoesnotexist,oriftheyarenotthesametypetype.linkspsigname[arrow]pinname(OBSOLETE-usenetinstead)(linksignaltopin)Workslikelinkpsbutreversestheorderofthearguments.halcmdtreatsbothlinklinkpppinname1[arrow]pinname2dsexactlythesame.Usewhicheveryouprefer.(OBSOLETE-usenetinstead)(linkpintopin)Shortcutforlinkpsthatcreatesthesignal(namedlikethefirstpin),thenlinksthembothtothatsignal.halcmdtreatsthisjustasifitwere:halcmdnewsigpinname1halcmdlinksppinname1pinname1halcmdlinksppinname1pinname2netsignamepinname...Createsignnametomatchthetypeofpinnameifitdoesnotyetexist.Then,linksignametoeachpinnameinturn.Arrowsmaybeusedasinlinkps.Whenlinkingapintoasignalforthefirsttime,thesignalvaluewillinheritthepin’sdefaultvalue.unlinkppinname(unlinkpin)Breaksanypreviouslinktopinname.Failsifpinnamedoesnotexist.Anunlinkedpinwillretainthelastvalueofthesignalitwaslinkedto.setpnamevalue(setparameterorpin)Setsthevalueofparameterorpinnametovalue.Failsifnamedoesnotexistasapinorparameter,ifitisaparameterthatisnotwritable,ifitisapinthatisanoutput,ifitisapinthatisalyattachedtoasignal,orifvalueisnotalegalvalue.Legalvaluesdependonthetypeofthepinorparameter.Ifapinandaparameterbothexistwiththegivenname,theparameteriparamname=valuepinname=valueedon.Identicaltosetp.Thisalternateformoftheusedinafile.dmaybemoreconvenientandablewhenptypename(parameterorpintype)Getsthetypeofparameterorpinname.Failsifnamedoesnotexistasapinorparameter.Ifapinandaparameterbothexistwiththegivenname,theparameterion.getpnameed(getparameterorpin)Getsthevalueofparameterorpinname.Failsifnamedoesnotexistasapinorparameter.Ifapinandaparameterbothexistwiththegivenname,theparameterion.edaddffunctnamethname(addfunction)Addsfunctionfunctnametorealtimeth thname.functnamewillrunafteranyfunctionsthatwerepreviouslyaddedtothethdoesnotexist,oriftheyareincompatible..Failsifeitherfunctnameorthnamedelffunctnamethname(deletefunction)Removesfunctionfunctnamefromrealtimeththname.Failsifeitherfunctnameorthnamedoesnotexist,oriffunctnameisnotcurrentlypartofthname.startStartsexecutionofrealtimethaddedtoitwiththeaddfStopsexecutionofrealtimeths.Eachthperiodicallycallsallofthefunctionsthatwered,intheorderinwhichtheyweded.stops.Theth swillnolongercalltheirfunctions.LinuxCNCDocumentation2003-12-1815HALCMD(1)HALUser’sManualHALCMD(1)show[item

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論