1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611 |
- <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
- [
- <!ENTITY version SYSTEM "gpib_version.txt">
- <!ENTITY license SYSTEM "fdl.xml">
- ]>
- <article>
- <articleinfo>
- <title>
- Linux-GPIB &version Documentation
- </title>
- <author>
- <firstname>Frank</firstname>
- <othername>Mori</othername>
- <surname>Hess</surname>
- <affiliation>
- <address>
- fmhess@users.sourceforge.net
- </address>
- </affiliation>
- </author>
- <copyright>
- <year>2003-2006, 2008</year>
- <holder>Frank Mori Hess</holder>
- </copyright>
- </articleinfo>
- <section>
- <title>
- Copying
- </title>
- <para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.2
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
- A copy of the license is included in the section entitled
- <link LINKEND="gfdl">"GNU Free Documentation License"</link>.
- </para>
- <para>
- Alternatively, you may redistribute and/or modify this document under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your option) any later
- version.
- </para>
- </section>
- <section ID="configuration">
- <title>
- Configuration
- </title>
- <para>
- Configuration of the GPIB library is accomplished through the
- configuration file
- <link LINKEND="configuration-gpib-conf">/etc/gpib.conf</link>,
- and the administration program
- <link LINKEND="configuration-gpib-config">gpib_config</link>.
- </para>
- <refentry ID="configuration-gpib-conf">
- <refmeta>
- <refentrytitle>gpib.conf</refentrytitle>
- <manvolnum>5</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>gpib.conf</refname>
- <refpurpose>GPIB library configuration file</refpurpose>
- </refnamediv>
- <refsect1>
- <title>Description</title>
- <para>
- The library, and the administration tool
- <link LINKEND="configuration-gpib-config">gpib_config</link>
- read their configuration information from the
- file /etc/gpib.conf. A template gpib.conf
- file can be found in the util/templates/ subdirectory of the linux-gpib
- package.
- </para>
- <para>
- The configuration file must contain one or more 'interface' entries, and
- can contain zero or more 'device' entries. 'device' entries are only
- required if you wish to open device descriptors with
- <link LINKEND="reference-function-ibfind">ibfind()</link> instead
- of using <link LINKEND="reference-function-ibdev">ibdev()</link>.
- Several example entries, and a table summarizing the possible
- options follow.
- </para>
- <para>
- <programlisting>
- interface {
- minor = 0
- board_type = "ni_pci"
- pad = 0
- master = yes
- }
- interface {
- minor = 1
- board_type = "ines_pci"
- name = "joe"
- pad = 5
- sad = 0
- timeout = T10s
- pci_bus = 0
- pci_slot = 0xd
- master = no
- }
- interface {
- minor = 2
- board_type = "pcII"
- pad = 3
- sad = 0x62
- eos = 0x0d
- set-reos = yes
- set-bin = no
- set-xeos = no
- set-eot = yes
- base = 0x300
- irq = 5
- dma = 0
- master = no
- }
- device {
- minor = 0
- name = "counter"
- pad = 24
- }
- device {
- minor = 0
- name = "voltmeter"
- pad = 7
- sad = 110
- eos = 0xa
- set-reos = yes
- set-bin = no
- set-xeos = yes
- set-eot = no
- timeout = T1s
- }
- </programlisting>
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>configuration options</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>option name</entry>
- <entry>description</entry>
- <entry>used by interface or device entries</entry>
- <entry>required or optional</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>base</entry>
- <entry>Specifies the base ioport or io memory address for a
- board that lacks plug-and-play capability.</entry>
- <entry>interface</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>board_type</entry>
- <entry>Specifies the type of interface board. See the drivers.txt
- file for a list of possible board types, and the kernel driver
- module that supports them.</entry>
- <entry>interface</entry>
- <entry>required</entry>
- </row>
- <row>
- <entry>dma</entry>
- <entry>Specifies the dma channel for a board that lacks plug-and-play
- capability.</entry>
- <entry>interface</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>eos</entry>
- <entry>Sets the end-of-string byte for board or device descriptors
- obtained with ibfind(). See also the set-reos, set-bin, and set-xeos
- options.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>irq</entry>
- <entry>Specifies the interrupt level for a board that lacks
- plug-and-play capability.</entry>
- <entry>interface</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>master</entry>
- <entry>Set to 'yes' if you want the interface board to
- be the system controller of the bus. There can only
- be one system controller on a bus.</entry>
- <entry>interface</entry>
- <entry>required</entry>
- </row>
- <row>
- <entry>minor</entry>
- <entry>'minor' specifies the minor number of the device file this
- interface board will use. A 'minor' of 0 corresponds
- to /dev/gpib0, 1 is /dev/gpib1, etc. The minor number is also
- equal to the 'board index' which can be used as a board descriptor,
- and is passed as one of the arguments of <link LINKEND="reference-function-ibdev">
- ibdev()</link>
- </entry>
- <entry>interface</entry>
- <entry>required</entry>
- </row>
- <row>
- <entry>name</entry>
- <entry>The 'name' specifies the name which can be used with ibfind()
- to get a descriptor for the board or device associated with this entry.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>pad</entry>
- <entry>Specifies the primary GPIB address (valid addresses are 0 to 30).
- For interfaces, this is the primary address that the board will be
- assigned when it is first brought online. For devices, this is address
- that will be used by device descriptors obtained with ibfind().</entry>
- <entry>interface or device</entry>
- <entry>required</entry>
- </row>
- <row>
- <entry>pci_bus</entry>
- <entry>Useful for distinguishing between multiple PCI cards. If
- you have more than one PCI card that with the same 'board_type', you can
- use the 'pci_bus' and 'pci_slot' options to specify the particular
- card you are interested in. </entry>
- <entry>interface</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>pci_slot</entry>
- <entry>Can be used in conjunction with 'pci_bus' to specify
- a particular pci card.</entry>
- <entry>interface</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>sad</entry>
- <entry>Specifies the secondary GPIB address. Valid values are 0, or
- 0x60 to 0x7e hexadecimal (96 to 126 decimal). A value of 0 means
- secondary addressing is disabled (the default). Secondary addresses
- from 0 to 30
- are specified by the library's convention of adding an offset of 0x60.
- </entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>set-bin</entry>
- <entry>Enables 8-bit comparisons when matching the
- end-of-string byte, instead of only comparing the
- 7 least significant bits. Only affects descriptors
- returned by ibfind(), and has same effect as setting
- the BIN bit in a
- <link LINKEND="reference-function-ibeos">ibeos()</link>
- call.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>set-eot</entry>
- <entry>Enables assertion of the EOI line at the
- end of writes, for descriptors
- returned by ibfind(). See
- <link LINKEND="reference-function-ibeot">ibeot()</link>.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>set-reos</entry>
- <entry>Enables the termination of reads on reception of the
- end-of-string byte for descriptors returned by ibfind().
- Same as setting the REOS bit in a
- <link LINKEND="reference-function-ibeos">ibeos()</link>
- call.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>set-xeos</entry>
- <entry>Enables the assertion of EOI on transmission of the
- end-of-string byte for descriptors returned by ibfind().
- Same as setting the XEOS bit in a
- <link LINKEND="reference-function-ibeos">ibeos()</link>
- call.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- <row>
- <entry>timeout</entry>
- <entry>Sets the io timeout for a board or device descriptor opened through
- ibfind(). The possible settings are the same as the constants
- used by <link LINKEND="reference-function-ibtmo">ibtmo()</link>.</entry>
- <entry>interface or device</entry>
- <entry>optional</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </refsect1>
- </refentry>
- <refentry ID="configuration-gpib-config">
- <refmeta>
- <refentrytitle>gpib_config</refentrytitle>
- <manvolnum>8</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>gpib_config</refname>
- <refpurpose>GPIB administration program</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>gpib_config</command>
- <arg>--minor <replaceable>number</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>gpib_config</command>
- <arg>--board-type <replaceable>board_type</replaceable></arg>
- <arg>--dma <replaceable>number</replaceable></arg>
- <arg>--file <replaceable>file_path</replaceable></arg>
- <arg>--iobase <replaceable>number</replaceable></arg>
- <arg>--ifc</arg>
- <arg>--no-ifc</arg>
- <arg>--irq <replaceable>number</replaceable></arg>
- <arg>--minor <replaceable>number</replaceable></arg>
- <arg>--pad <replaceable>number</replaceable></arg>
- <arg>--pci-bus <replaceable>number</replaceable></arg>
- <arg>--pci-slot <replaceable>number</replaceable></arg>
- <arg>--sad <replaceable>number</replaceable></arg>
- <arg>--sre</arg>
- <arg>--no-sre</arg>
- <arg>--system-controller</arg>
- <arg>--no-system-controller</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>Description</title>
- <para>gpib_config must be run after the kernel driver module for
- a GPIB interface board is loaded. It performs configuration of
- driver settings
- that cannot be performed by libgpib at runtime. This includes
- configuration which requires root privilege (for example, setting the
- base address or irq of a board), and configuration which should only
- be performed once and not automatically redone every time a program
- using libgpib is run (for example, setting the board's GPIB address).
- </para>
- <para>
- The board to be configured by gpib_config is selected by the
- <option>--minor</option> option. By default, the board settings
- are read from the
- <link LINKEND="configuration-gpib-conf">gpib.conf</link>
- configuration file. However, individual settings can be
- overiden by use of command-line options (see below).
- </para>
- </refsect1>
- <refsect1>
- <title>Options</title>
- <para><option>-b, --iobase <replaceable>number</replaceable></option></para>
- <para>Set io base address to <replaceable>number</replaceable> for boards
- without plug-and-play cabability.</para>
- <para><option>-d, --dma <replaceable>number</replaceable></option></para>
- <para>Specify isa dma channel <replaceable>number</replaceable> for boards
- without plug-and-play cabability.</para>
- <para><option>-I, --init-data <replaceable>file_path</replaceable></option></para>
- <para>Upload binary initialization data (firmware) from <replaceable>file_path</replaceable>
- to board.</para>
- <para><option>-i, --irq <replaceable>number</replaceable></option></para>
- <para>Specify irq line <replaceable>number</replaceable> for boards without
- plug-and-play cabability.</para>
- <para><option>-f, --file <replaceable>file_path</replaceable></option></para>
- <para>Specify file path for configuration file. The values in the configuration
- file will be used as defaults for unspecified options. The default configuration
- file is "/etc/gpib.conf".</para>
- <para><option>-h, --help</option></para>
- <para>Print help on options and exit.</para>
- <para><option>-l, --pci-slot <replaceable>number</replaceable></option></para>
- <para>Specify pci slot <replaceable>number</replaceable> to select a specific
- pci board. If used, you must also specify the pci bus with <option>--pci-bus</option>.
- </para>
- <para><option>-m, --minor <replaceable>number</replaceable></option></para>
- <para>
- Configure gpib device file with minor number <replaceable>number</replaceable>
- (default is 0).</para>
- <para><option>-p, --pad <replaceable>number</replaceable></option></para>
- <para>
- Specify primary gpib address. <replaceable>number</replaceable> should be in
- the range 0 through 30.
- </para>
- <para><option>-s, --sad <replaceable>number</replaceable></option></para>
- <para>
- Specify secondary gpib address. <replaceable>number</replaceable>
- should be 0 (disabled) or in the range 96 through 126 (0x60 through 0x7e hexadecimal).
- </para>
- <para><option>-t, --board-type <replaceable>board_type</replaceable></option></para>
- <para>Set board type to <replaceable>board_type</replaceable>.</para>
- <para><option>-u, --pci-bus <replaceable>number</replaceable></option></para>
- <para>Specify pci bus <replaceable>number</replaceable> to select a specific
- pci board. If used, you must also specify the pci slot with <option>--pci-slot</option>.
- </para>
- <para><option>--[no-]ifc</option></para>
- <para> Perform (or not) interface clear after bringing board online.
- Default is <option>--ifc</option>.</para>
- <para><option>--[no-]sre</option></para>
- <para>Assert (or not) remote enable line after bringing board online.
- Default is <option>--sre</option>.</para>
- <para><option>--[no-]system-controller</option></para>
- <para>Configure board as system controller (or not).</para>
- </refsect1>
- </refentry>
- </section>
- <section ID="supported-hardware">
- <title>
- Supported Hardware
- </title>
- <section ID="hardware-matrix">
- <title>
- Supported Hardware Matrix
- </title>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>Linux-GPIB Supported Hardware Matrix</title>
- <tgroup COLS="4" ALIGN="left" >
- <thead>
- <row>
- <entry>make</entry>
- <entry>model</entry>
- <entry>kernel driver module</entry>
- <entry>board_type (for /etc/gpib.conf)</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Agilent (HP)</entry>
- <entry><link LINKEND="hp-82341">82341C</link></entry>
- <entry>hp_82341.ko</entry>
- <entry>hp_82341</entry>
- </row>
- <row>
- <entry>Agilent (HP)</entry>
- <entry><link LINKEND="hp-82341">82341D</link></entry>
- <entry>hp_82341.ko</entry>
- <entry>hp_82341</entry>
- </row>
- <row>
- <entry>Agilent (HP)</entry>
- <entry><link LINKEND="agilent-82350b">82350A</link></entry>
- <entry>agilent_82350b.ko</entry>
- <entry>agilent_82350b</entry>
- </row>
- <row>
- <entry>Agilent</entry>
- <entry><link LINKEND="agilent-82350b">82350B</link></entry>
- <entry>agilent_82350b.ko</entry>
- <entry>agilent_82350b</entry>
- </row>
- <row>
- <entry>Agilent</entry>
- <entry><link LINKEND="agilent-82357a">82357A</link></entry>
- <entry>agilent_82357a.ko</entry>
- <entry>agilent_82357a</entry>
- </row>
- <row>
- <entry>Agilent</entry>
- <entry><link LINKEND="agilent-82357a">82357B</link></entry>
- <entry>agilent_82357a.ko</entry>
- <entry>agilent_82357a</entry>
- </row>
- <row>
- <entry>Capital Equipment Corporation</entry>
- <entry>PC-488</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcII</entry>
- </row>
- <row>
- <entry>Capital Equipment Corporation</entry>
- <entry>PCI-488</entry>
- <entry>cec_gpib.ko</entry>
- <entry>cec_pci</entry>
- </row>
- <row>
- <entry>CONTEC</entry>
- <entry>GP-IB(PC)</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcIIa</entry>
- </row>
- <row>
- <entry>Hameg</entry>
- <entry>HO80</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcII</entry>
- </row>
- <row>
- <entry>Hameg</entry>
- <entry>HO80-2</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_isa</entry>
- </row>
- <row>
- <entry>Hewlett Packard</entry>
- <entry>HP82335</entry>
- <entry>hp82335.ko</entry>
- <entry>hp82335</entry>
- </row>
- <row>
- <entry>Hewlett Packard</entry>
- <entry>HP27209</entry>
- <entry>hp82335.ko</entry>
- <entry>hp82335</entry>
- </row>
- <row>
- <entry>Ines</entry>
- <entry>GPIB-HS-NT</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_isa</entry>
- </row>
- <row>
- <entry>Ines</entry>
- <entry>GPIB for Compact PCI</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_pci, ines_pci_unaccel</entry>
- </row>
- <row>
- <entry>Ines</entry>
- <entry>GPIB for PCI</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_pci, ines_pci_unaccel</entry>
- </row>
- <row>
- <entry>Ines</entry>
- <entry>GPIB for PCMCIA</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_pcmcia, ines_pcmcia_unaccel</entry>
- </row>
- <row>
- <entry>Ines</entry>
- <entry>GPIB PC/104</entry>
- <entry>ines_gpib.ko</entry>
- <entry>ines_isa</entry>
- </row>
- <row>
- <entry>Iotech</entry>
- <entry>GP488B</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcIIa</entry>
- </row>
- <row>
- <entry>Keithley</entry>
- <entry>KPCI-488</entry>
- <entry>cec_gpib.ko</entry>
- <entry>cec_pci</entry>
- </row>
- <row>
- <entry>Keithley</entry>
- <entry>MBC-488</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcII</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>CPCI-GPIB</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_pci, cbi_pci_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>ISA-GPIB</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_isa, cbi_isa_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>ISA-GPIB/LC</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_isa_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>ISA-GPIB-PC2A</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcIIa (nec7210 chip), pcIIa_cb7210 (cb7210 chip)</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>PCI-GPIB/1M</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_pci, cbi_pci_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>PCI-GPIB/300K</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_pci_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>PCMCIA-GPIB</entry>
- <entry>cb7210.ko</entry>
- <entry>cbi_pcmcia, cbi_pcmcia_unaccel</entry>
- </row>
- <row>
- <entry>Measurement Computing (Computer Boards)</entry>
- <entry>USB-488</entry>
- <entry>ni_usb_gpib.ko</entry>
- <entry>ni_usb_b</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>AT-GPIB (with NAT4882 chip)</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_nat4882_isa, ni_nat4882_isa_accel</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>AT-GPIB (with NEC7210 chip)</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_nec_isa, ni_nec_isa_accel</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>AT-GPIB/TNT</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_isa, ni_isa_accel</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry><link LINKEND="ni-usb-b">GPIB-USB-B</link></entry>
- <entry>ni_usb_gpib.ko</entry>
- <entry>ni_usb_b</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry><link LINKEND="ni-usb-hs">GPIB-USB-HS</link></entry>
- <entry>ni_usb_gpib.ko</entry>
- <entry>ni_usb_b</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCI-GPIB</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_pci</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCI-GPIB+</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_pci</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCM-GPIB</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_pci</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PXI-GPIB</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_pci</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCII</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcII</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCIIa</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcIIa</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCII/IIa</entry>
- <entry>pc2_gpib.ko</entry>
- <entry>pcII or pcII_IIa (depending on board switch)</entry>
- </row>
- <row>
- <entry>National Instruments</entry>
- <entry>PCMCIA-GPIB</entry>
- <entry>tnt4882.ko</entry>
- <entry>ni_pcmcia, ni_pcmcia_accel</entry>
- </row>
- <row>
- <entry>Quancom</entry>
- <entry>PCIGPIB-1</entry>
- <entry>ines_gpib.ko (Ines iGPIB 72010 chip) or cb7210.ko (Measurement Computing cb7210 chip)</entry>
- <entry>ines_pci or ines_pci_unaccel (Ines iGPIB 72010 chip),
- cbi_pci_unaccel (Measurement Computing cb7210 chip)</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </section>
- <section ID="board-specific-notes">
- <title>Board-Specific Notes</title>
- <section ID="hp-82341">
- <title>Agilent (HP) 82341</title>
- <para>
- After power-up, the Agilent 82341 boards require a firmware upload before they
- can be used. This can be accomplished using the "--init-data" option of
- <link LINKEND="configuration-gpib-config">gpib_config</link>. The
- firmware data can be found in the gpib_firmware
- tarball available from the
- <ulink URL="http://linux-gpib.sourceforge.net/">Linux-GPIB home page</ulink>.
- Note the C and D versions use different firmware data.
- </para>
- <para>
- If you specify a non-zero base address in /etc/gpib.conf, the driver will
- assume you are trying to configure a 82341C. Otherwise, the driver will
- use the kernel's ISAPNP support to attempt to configure an 82341D.
- </para>
- <para>
- The 82341 does not support detection of an end-of-string character
- in hardware, it only automatically detects the when the EOI
- line is asserted. Thus if you use the REOS
- flag for a read, the board's fifos will
- not be used for the transfer. This will greatly reduce the maximum transfer
- rate for your board (which may or may not be noticeable depending on the
- device you are talking to).
- </para>
- </section>
- <section ID="agilent-82350b">
- <title>Agilent 82350A/B</title>
- <para>
- The Agilent 82350A and 82350B do not support detection of an end-of-string character
- during reads in hardware, they can only detect assertion of the EOI
- line. Thus if you use the REOS
- flag for a read, the boards' fifos will
- not be used for the transfer. This will greatly reduce the maximum transfer
- rate for your board (which may or may not be noticeable depending on the
- device you are talking to).
- </para>
- <para>
- After power-up, the 82350A boards require a firmware upload before they
- can be used. This can be accomplished using the "--init-data" option of
- <link LINKEND="configuration-gpib-config">gpib_config</link>. The
- firmware data can be found in the gpib_firmware
- tarball available from the
- <ulink URL="http://linux-gpib.sourceforge.net/">Linux-GPIB home page</ulink>.
- The 82350B does not require a firmware upload.
- </para>
- </section>
- <section ID="agilent-82357a">
- <title>Agilent 82357A/B</title>
- <para>
- The Agilent 82357A and 82357B require a firmware upload
- (before gpib_config is run) to become functional
- after being plugged in. The linux-gpib tarball contains hotplug scripts
- for automatically running the fxload program to upload the firmware (and
- to run gpib_config after the firmware is uploaded).
- However, the actual firmware
- data itself must be obtained seperately, as part of the gpib_firmware
- tarball available from the
- <ulink URL="http://linux-gpib.sourceforge.net/">Linux-GPIB home page</ulink>.
- </para>
- <para>
- The 82357A/B have a few limitation due to their firmware code:
- <itemizedlist>
- <listitem>
- <para>
- They cannot be run as a device, but must be the system controller.
- </para>
- </listitem>
- <listitem>
- <para>
- They cannot be assigned a secondary address.
- </para>
- </listitem>
- <listitem>
- <para>
- They cannot do 7 bit compares when looking for an end-of-string character (they always
- compare all 8 bits).
- </para>
- </listitem>
- </itemizedList>
- </para>
- </section>
- <section ID="ni-usb-b">
- <title>National Instruments GPIB-USB-B</title>
- <para>
- The USB-B requires a firmware upload (before gpib_config is
- run) to become functional
- after being plugged in. The linux-gpib tarball contains hotplug scripts
- for automatically running the fxload program to upload the firmware (and
- to run gpib_config after the firmware is uploaded).
- However, the actual firmware
- data itself must be obtained seperately, as part of the gpib_firmware
- tarball available from the
- <ulink URL="http://linux-gpib.sourceforge.net/">Linux-GPIB home page</ulink>.
- </para>
- </section>
- <section ID="ni-usb-hs">
- <title>National Instruments GPIB-USB-HS</title>
- <para>
- Unlike the USB-B, the USB-HS does not require a firmware upload to become
- functional
- after being plugged in. The linux-gpib tarball contains hotplug scripts
- which will automatically run gpib_config after the device is plugged in.
- </para>
- </section>
- </section>
- </section>
- <section ID="reference">
- <title>
- Linux-GPIB Reference
- </title>
- <para>
- Reference for libgpib functions, macros, and constants.
- </para>
- <section>
- <title>Global Variables</title>
- <refentry ID="reference-globals-ibcnt">
- <refmeta>
- <refentrytitle>ibcnt and ibcntl</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibcnt and ibcntl</refname>
- <refpurpose>hold number of bytes transferred, or errno</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <programlisting>
- #include <gpib/ib.h>
- volatile int ibcnt;
- volatile long ibcntl;
- </programlisting>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibcnt and ibcntl are set after IO operations to the the the number of
- bytes sent or received. They are also set to the value of errno after
- EDVR or EFSO errors.
- </para>
- <para>
- If you wish to avoid using a global variable, you may instead use
- <link LINKEND="reference-function-thread-ibcnt">ThreadIbcnt()
- or ThreadIbcntl()</link>
- which return thread-specific values.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-globals-iberr">
- <refmeta>
- <refentrytitle>iberr</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>iberr</refname>
- <refpurpose>holds error code</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <programlisting>
- #include <gpib/ib.h>
- volatile int iberr;
- </programlisting>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- iberr is set whenever a function from the 'traditional' or 'multidevice'
- API fails with an error. The meaning of each possible value of iberr
- is summarized
- in the following table:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>iberr error codes</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value</entry>
- <entry>meaning</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>EDVR</entry>
- <entry>0</entry>
- <entry>A system call has failed. ibcnt/ibcntl will be set to the
- value of errno.</entry>
- </row>
- <row>
- <entry>ECIC</entry>
- <entry>1</entry>
- <entry>Your interface board needs to be controller-in-charge, but
- is not.</entry>
- </row>
- <row>
- <entry>ENOL</entry>
- <entry>2</entry>
- <entry>You have attempted to write data or command bytes, but
- there are no listeners currently addressed.</entry>
- </row>
- <row>
- <entry>EADR</entry>
- <entry>3</entry>
- <entry>The interface board has failed to address itself properly
- before starting an io operation.</entry>
- </row>
- <row>
- <entry>EARG</entry>
- <entry>4</entry>
- <entry>One or more arguments to the function call were invalid.</entry>
- </row>
- <row>
- <entry>ESAC</entry>
- <entry>5</entry>
- <entry>The interface board needs to be system controller, but is not.
- </entry>
- </row>
- <row>
- <entry>EABO</entry>
- <entry>6</entry>
- <entry>A read or write of data bytes has been aborted, possibly due
- to a timeout or reception of a device clear command.</entry>
- </row>
- <row>
- <entry>ENEB</entry>
- <entry>7</entry>
- <entry>The GPIB interface board does not exist, its driver is not
- loaded, or it is not configured properly.</entry>
- </row>
- <row>
- <entry>EDMA</entry>
- <entry>8</entry>
- <entry>Not used (DMA error), included for compatibility purposes.</entry>
- </row>
- <row>
- <entry>EOIP</entry>
- <entry>10</entry>
- <entry>Function call can not proceed due to an asynchronous IO operation
- (ibrda(), ibwrta(), or ibcmda()) in progress.</entry>
- </row>
- <row>
- <entry>ECAP</entry>
- <entry>11</entry>
- <entry>Incapable of executing function call, due the GPIB board lacking
- the capability, or
- the capability being disabled in software.</entry>
- </row>
- <row>
- <entry>EFSO</entry>
- <entry>12</entry>
- <entry>File system error. ibcnt/ibcntl will be set to the value of errno.</entry>
- </row>
- <row>
- <entry>EBUS</entry>
- <entry>14</entry>
- <entry>An attempt to write command bytes to the bus has timed out.</entry>
- </row>
- <row>
- <entry>ESTB</entry>
- <entry>15</entry>
- <entry>One or more serial poll status bytes have been lost. This can
- occur due to
- too many status bytes accumulating (through automatic serial polling)
- without being read.</entry>
- </row>
- <row>
- <entry>ESRQ</entry>
- <entry>16</entry>
- <entry>The serial poll request service line is stuck on. This can occur
- if a physical device on the bus requests service, but its GPIB address has
- not been opened
- (via ibdev() for example) by any process. Thus the automatic serial
- polling routines are unaware of the device's existence and will never
- serial poll it.
- </entry>
- </row>
- <row>
- <entry>ETAB</entry>
- <entry>20</entry>
- <entry>This error can be returned by
- <link LINKEND="reference-function-ibevent">ibevent()</link>, FindLstn(), or
- FindRQS(). See their descriptions for more information.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- <para>
- If you wish to avoid using a global variable, you may instead use
- <link LINKEND="reference-function-thread-iberr">ThreadIberr()</link>
- which returns a thread-specific value.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-globals-ibsta">
- <refmeta>
- <refentrytitle>ibsta</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibsta</refname>
- <refpurpose>holds status</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <programlisting>
- #include <gpib/ib.h>
- volatile int ibsta;
- </programlisting>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibsta is set whenever a function from the 'traditional' or 'multidevice'
- API is called. Each of the bits in ibsta has a different meaning, summarized
- in the following table:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>ibsta Bits</title>
- <tgroup COLS="4" ALIGN="left" >
- <thead>
- <row>
- <entry>bit</entry>
- <entry>value (hexadecimal)</entry>
- <entry>meaning</entry>
- <entry>used for board/device</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>DCAS</entry>
- <entry>0x1</entry>
- <entry>DCAS is set when a board receives the device clear command
- (that is, the
- SDC or DCL <link LINKEND="reference-command-bytes">command byte</link>).
- It is cleared on the next 'traditional' or
- 'multidevice' function call following ibwait() (with DCAS set in the
- wait mask), or following a read
- or write (ibrd(), ibwrt(), Receive(), etc.).
- The DCAS and DTAS bits will only be set if the event queue is disabled.
- The event queue may be disabled with
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>DTAS</entry>
- <entry>0x2</entry>
- <entry>DTAS is set when a board has received a device trigger command
- (that is,
- the GET <link LINKEND="reference-command-bytes">command byte</link>).
- It is cleared on the next 'traditional' or
- 'multidevice' function call following ibwait() (with DTAS in the wait
- mask).
- The DCAS and DTAS bits will only be set if the event queue is disabled.
- The event queue may be disabled with
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>LACS</entry>
- <entry>0x4</entry>
- <entry>Board is currently addressed as a listener.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>TACS</entry>
- <entry>0x8</entry>
- <entry>Board is currently addressed as talker.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>ATN</entry>
- <entry>0x10</entry>
- <entry>The ATN line is asserted.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>CIC</entry>
- <entry>0x20</entry>
- <entry>Board is controller-in-charge, so it is able to set the ATN line.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>REM</entry>
- <entry>0x40</entry>
- <entry>Board is in 'remote' state.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>LOK</entry>
- <entry>0x80</entry>
- <entry>Board is in 'lockout' state.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>CMPL</entry>
- <entry>0x100</entry>
- <entry>I/O operation is complete. Useful for determining when
- an asynchronous io operation (ibrda(), ibwrta(), etc) has
- completed.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>EVENT</entry>
- <entry>0x200</entry>
- <entry>One or more clear, trigger, or interface clear events have been received,
- and are available in the event queue
- (see <link LINKEND="reference-function-ibevent">ibevent()</link>).
- The EVENT bit will only be set if the event queue is enabled. The
- event queue may be enabled with
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>SPOLL</entry>
- <entry>0x400</entry>
- <entry>If this bit is enabled (see ibconfig()), it is set when the board is
- serial polled. The SPOLL bit is cleared when the board requests service
- (see ibrsv()) or you call ibwait() on the board with SPOLL in the wait mask.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>RQS</entry>
- <entry>0x800</entry>
- <entry>RQS indicates that the device has requested service, and one
- or more status bytes are available for reading with ibrsp(). RQS will
- only be set if you have automatic serial polling enabled (see
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>).</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>SRQI</entry>
- <entry>0x1000</entry>
- <entry>SRQI indicates that a device connected to the board is asserting
- the SRQ line. It
- is only set if the board is the controller-in-charge. If
- automatic serial polling is enabled (see
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>),
- SRQI will generally be cleared,
- since when a device requests service it will be automatically
- polled and then unassert SRQ.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>END</entry>
- <entry>0x2000</entry>
- <entry>END is set if the last io operation ended with the EOI
- line asserted, and may be set on reception of the end-of-string character.
- The
- IbcEndBitIsNormal option of ibconfig() can be used to configure
- whether or not END should be set on reception of the eos character.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>TIMO</entry>
- <entry>0x4000</entry>
- <entry>TIMO indicates that the last io operation or ibwait() timed out.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>ERR</entry>
- <entry>0x8000</entry>
- <entry>ERR is set if the last 'traditional' or 'multidevice' function
- call failed. The global variable <link LINKEND="reference-globals-iberr">iberr</link>
- will be set indicate the
- cause of the error.</entry>
- <entry>board or device</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- <para>
- If you wish to avoid using a global variable, you may instead use
- <link LINKEND="reference-function-thread-ibsta">ThreadIbsta()</link>
- which returns a thread-specific value.
- </para>
- </refsect1>
- </refentry>
- </section>
- <section>
- <title>
- 'Traditional' API Functions
- </title>
- <refentry ID="reference-function-ibask">
- <refmeta>
- <refentrytitle>ibask</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibask</refname>
- <refpurpose>query configuration (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibask</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>option</parameter></paramdef>
- <paramdef>int *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Queries various configuration settings associated with the
- board or device descriptor <parameter>ud</parameter>. The
- <parameter>option</parameter> argument specifies the particular
- setting you wish to query. The result of the query is written
- to the location specified by <parameter>result</parameter>.
- To change the descriptor's configuration, see
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>.
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>ibask options</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>option</entry>
- <entry>value (hexadecimal)</entry>
- <entry>result of query</entry>
- <entry>used for board/device</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>IbaPAD</entry>
- <entry>0x1</entry>
- <entry>GPIB primary address</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaSAD</entry>
- <entry>0x2</entry>
- <entry>GPIB secondary address (0 for none, 0x60 to 0x7e for secondary
- addresses 0 to 30)</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaTMO</entry>
- <entry>0x3</entry>
- <entry>Timeout setting for io operations (a number from 0 to 17). See
- <link LINKEND="reference-function-ibtmo">ibmto()</link>.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaEOT</entry>
- <entry>0x4</entry>
- <entry>Nonzero if EOI is asserted with last byte on writes.
- See <link LINKEND="reference-function-ibeot">ibeot()</link>.
- </entry>
- <entry></entry>
- </row>
- <row>
- <entry>IbaPPC</entry>
- <entry>0x5</entry>
- <entry>Parallel poll configuration. See
- <link LINKEND="reference-function-ibppc">ibppc()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaREADDR</entry>
- <entry>0x6</entry>
- <entry>Useless, included for compatibility only.</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbaAUTOPOLL</entry>
- <entry>0x7</entry>
- <entry>Nonzero if automatic serial polling is enabled.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaCICPROT</entry>
- <entry>0x8</entry>
- <entry>Useless, included for compatibility only.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaSC</entry>
- <entry>0xa</entry>
- <entry>Nonzero if board is system controller.
- See <link LINKEND="reference-function-ibrsc">ibrsc()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaSRE</entry>
- <entry>0xb</entry>
- <entry>Nonzero if board autmatically asserts REN line when
- it becomes the system controller. See
- <link LINKEND="reference-function-ibsre">ibsre()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaEOSrd</entry>
- <entry>0xc</entry>
- <entry>Nonzero if termination of reads on reception of the end-of-string
- character is enabled. See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the REOS bit.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaEOSwrt</entry>
- <entry>0xd</entry>
- <entry>Nonzero if EOI is asserted whenever end-of-string character is
- sent. See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the XEOS bit.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaEOScmp</entry>
- <entry>0xe</entry>
- <entry>Nonzero if all 8 bits are used to match end-of-string
- character. Zero if only least significant 7 bits are used.
- See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the BIN bit.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaEOSchar</entry>
- <entry>0xf</entry>
- <entry>The end-of-string byte.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaPP2</entry>
- <entry>0x10</entry>
- <entry>Nonzero if in local parallel poll configure mode. Zero
- if in remote parallel poll configure mode.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaTIMING</entry>
- <entry>0x11</entry>
- <entry>Number indicating T1 delay. 1 for 2 microseconds, 2 for 500
- nanoseconds, 3 for 350 nanoseconds. The values are declared in
- the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns,
- and T1_DELAY_350ns.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaReadAdjust</entry>
- <entry>0x13</entry>
- <entry>Nonzero if byte pairs are automatically swapped during
- reads.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaWriteAdjust</entry>
- <entry>0x14</entry>
- <entry>Nonzero if byte pairs are automatically swapped during
- writes.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaEventQueue</entry>
- <entry>0x15</entry>
- <entry>Nonzero if event queue is enabled.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaSPollBit</entry>
- <entry>0x16</entry>
- <entry>Nonzero if the use of the SPOLL bit in ibsta is enabled.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaSendLLO</entry>
- <entry>0x17</entry>
- <entry>Nonzero if devices connected to this board are automatically
- put into local lockout
- mode when brought online with ibfind() or ibdev().</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaSPollTime</entry>
- <entry>0x18</entry>
- <entry>Timeout for serial polls. The value of the result
- is between 0 and 17, and has the same meaning as in
- <link LINKEND="reference-function-ibtmo">ibtmo()</link>.
- </entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbaPPollTime</entry>
- <entry>0x18</entry>
- <entry>Timeout for parallel polls. The value of the result
- is between 0 and 17, and has the same meaning as in
- <link LINKEND="reference-function-ibtmo">ibtmo()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaEndBitIsNormal</entry>
- <entry>0x1a</entry>
- <entry>Nonzero if END bit of ibsta is set on reception of end-of-string
- character or EOI. Zero if END bit is only set on EOI.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbaUnAddr</entry>
- <entry>0x1b</entry>
- <entry>Nonzero if UNT (untalk) and UNL (unlisten) commands are automatically
- sent after a completed io operation using this descriptor.</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbaHSCableLength</entry>
- <entry>0x1f</entry>
- <entry>Useless, included only for compatibility.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaIst</entry>
- <entry>0x20</entry>
- <entry>Individual status bit, a.k.a. 'ist'.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaRsv</entry>
- <entry>0x21</entry>
- <entry>The current status byte this board will use to respond to
- serial polls.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbaBNA</entry>
- <entry>0x200</entry>
- <entry>Board index (minor number) of interface board which is
- the controller-in-charge of this device's GPIB bus.</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>Iba7BitEOS</entry>
- <entry>0x1000</entry>
- <entry>Nonzero if board supports 7 bit EOS comparisons.
- See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the BIN bit. This is a Linux-GPIB extension.
- </entry>
- <entry>board</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibbna">
- <refmeta>
- <refentrytitle>ibbna</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibbna</refname>
- <refpurpose>change access board (device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibbna</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibbna() changes the GPIB interface board used to access the device
- specified by <parameter>ud</parameter>. Subsequent device level
- calls using the descriptor <parameter>ud</parameter> will assume
- the device is connected to the interface board specified by
- <parameter>name</parameter>. If you wish to specify a
- device's new access board by board index instead
- of name, you can use the IbcBNA option of ibconfig().
- </para>
- <para>
- The name of a board can be specified
- in the configuration file <link LINKEND="configuration">gpib.conf</link>.
- </para>
- <para>
- On success, iberr is set to the board index of the device's old access board.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibcac">
- <refmeta>
- <refentrytitle>ibcac</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibcac</refname>
- <refpurpose>assert ATN (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibcac</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>synchronous</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibcac() causes the board specified by the board descriptor <parameter>ud</parameter>
- to become active controller by asserting the ATN line.
- The board must be controller-in-change in order to assert ATN.
- If <parameter>synchronous</parameter> is nonzero, then
- the board will wait for a data
- byte on the bus to complete its transfer before asserting ATN.
- If the synchronous attempt times out, or <parameter>synchronous</parameter>
- is zero, then ATN will be asserted immediately.
- </para>
- <para>
- It is generally not necessary to call ibcac(). It is provided
- for advanced users who want direct, low-level access to the GPIB bus.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibclr">
- <refmeta>
- <refentrytitle>ibclr</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibclr</refname>
- <refpurpose>clear device (device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibclr</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibclr() sends the clear command to the device specified by <parameter>ud</parameter>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibcmd">
- <refmeta>
- <refentrytitle>ibcmd</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibcmd</refname>
- <refpurpose>write command bytes (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibcmd</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const void *<parameter>commands</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibcmd() writes the <link LINKEND="reference-command-bytes">command bytes</link>
- contained
- in the array <parameter>commands</parameter>
- to the bus. The number of bytes written from the array is specified by
- <parameter>num_bytes</parameter>. The <parameter>ud</parameter> argument is a
- board descriptor, and the
- board must be controller-in-charge. Most of the
- possible command bytes are declared as constants in the header files.
- In particular, the constants GTL, SDC, PPConfig, GET, TCT, LLO, DCL, PPU, SPE,
- SPD, UNL, UNT,and PPD are available. Additionally, the inline functions
- MTA(), MLA(), MSA(), and PPE_byte() are available for producing
- 'my talk address', 'my listen address', 'my secondary address', and
- 'parallel poll enable' command bytes respectively.
- </para>
- <para>
- It is generally not necessary to call ibcmd(). It is provided
- for advanced users who want direct, low-level access to the GPIB bus.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibcmda">
- <refmeta>
- <refentrytitle>ibcmda</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibcmda</refname>
- <refpurpose>write command bytes asynchronously (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibcmda</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const void *<parameter>commands</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibcmda() is similar to
- <link LINKEND="reference-function-ibcmd">ibcmd()</link>
- except it operates asynchronously. ibcmda() does not
- wait for the sending of the command bytes to complete, but
- rather returns immediately.
- </para>
- <para>
- While an asynchronous
- operation is in progress, most library functions will
- fail with an EOIP error. In order to sucessfully
- complete an
- asynchronous operation, you must call
- <link LINKEND="reference-function-ibwait">ibwait()</link>
- until the CMPL bit is set ibsta. Asynchronous
- operations
- may also be aborted with an
- <link LINKEND="reference-function-ibstop">ibstop()</link>
- or
- <link LINKEND="reference-function-ibonl">ibonl()</link>
- call.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibconfig">
- <refmeta>
- <refentrytitle>ibconfig</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibconfig</refname>
- <refpurpose>change configuration (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibconfig</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>option</parameter></paramdef>
- <paramdef>int <parameter>setting</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Changes various configuration settings associated with the
- board or device descriptor <parameter>ud</parameter>. The
- <parameter>option</parameter> argument specifies the particular
- setting you wish to modify. The <parameter>setting</parameter>
- argument specifies the option's new configuration.
- To query the descriptor's configuration, see
- <link LINKEND="reference-function-ibask">ibask()</link>.
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>ibconfig options</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>option</entry>
- <entry>value (hexadecimal)</entry>
- <entry>effect</entry>
- <entry>used for board/device</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>IbcPAD</entry>
- <entry>0x1</entry>
- <entry>Sets GPIB primary address. Same as
- <link LINKEND="reference-function-ibpad">ibpad()</link>
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcSAD</entry>
- <entry>0x2</entry>
- <entry>Sets GPIB secondary address. Same as
- <link LINKEND="reference-function-ibsad">ibsad()</link>
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcTMO</entry>
- <entry>0x3</entry>
- <entry>Sets timeout for io operations. Same as
- <link LINKEND="reference-function-ibtmo">ibmto()</link>.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcEOT</entry>
- <entry>0x4</entry>
- <entry>If setting is nonzero, EOI is asserted with last byte on writes.
- Same as <link LINKEND="reference-function-ibeot">ibeot()</link>.
- </entry>
- <entry></entry>
- </row>
- <row>
- <entry>IbcPPC</entry>
- <entry>0x5</entry>
- <entry>Sets parallel poll configuration. Same as
- <link LINKEND="reference-function-ibppc">ibppc()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcREADDR</entry>
- <entry>0x6</entry>
- <entry>Useless, included for compatibility only.</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbcAUTOPOLL</entry>
- <entry>0x7</entry>
- <entry>If setting is nonzero then automatic serial polling is enabled.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcCICPROT</entry>
- <entry>0x8</entry>
- <entry>Useless, included for compatibility only.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcSC</entry>
- <entry>0xa</entry>
- <entry>If setting is nonzero, board becomes system controller.
- Same as <link LINKEND="reference-function-ibrsc">ibrsc()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcSRE</entry>
- <entry>0xb</entry>
- <entry>If setting is nonzero then board asserts REN line. Otherwise
- REN is unasserted. Same as
- <link LINKEND="reference-function-ibsre">ibsre()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcEOSrd</entry>
- <entry>0xc</entry>
- <entry>If setting is nonzero then reads are terminated on reception
- of the end-of-string character.
- See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the REOS bit.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcEOSwrt</entry>
- <entry>0xd</entry>
- <entry>If setting is nonzero then EOI is asserted whenever
- the end-of-string character is
- sent. See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the XEOS bit.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcEOScmp</entry>
- <entry>0xe</entry>
- <entry>If setting is nonzero then all 8 bits are used to match
- the end-of-string
- character. Otherwise only the least significant 7 bits are used.
- See <link LINKEND="reference-function-ibeos">ibeos()</link>,
- in particular the BIN bit.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcEOSchar</entry>
- <entry>0xf</entry>
- <entry>Sets the end-of-string byte.
- See <link LINKEND="reference-function-ibeos">ibeos()</link>.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcPP2</entry>
- <entry>0x10</entry>
- <entry>If setting is nonzero then the board is put into
- local parallel poll configure mode, and will not change
- its parallel poll configuration in response to receiving
- 'parallel poll enable' command bytes from the controller-in-charge.
- Otherwise the board is put in remote parallel poll configure mode.
- Some older hardware does not support local parallel poll
- configure mode.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcTIMING</entry>
- <entry>0x11</entry>
- <entry>Sets the T1 delay. Use setting of 1 for 2 microseconds, 2 for 500
- nanoseconds, or 3 for 350 nanoseconds. These values are declared in
- the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns,
- and T1_DELAY_350ns. A 2 microsecond T1 delay is safest, but
- will limit maximum transfer speeds to a few hundred kilobytes
- per second.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcReadAdjust</entry>
- <entry>0x13</entry>
- <entry>If setting is nonzero then byte pairs are automatically swapped
- during reads. Presently, this feature is unimplemented.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcWriteAdjust</entry>
- <entry>0x14</entry>
- <entry>If setting is nonzero then byte pairs are automatically swapped
- during writes. Presently, this feature is unimplemented.
- </entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcEventQueue</entry>
- <entry>0x15</entry>
- <entry>If setting is nonzero then the event queue is enabled. The
- event queue is disabled by default.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcSPollBit</entry>
- <entry>0x16</entry>
- <entry>If the setting is nonzero then the use of the SPOLL bit in ibsta is enabled.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcSendLLO</entry>
- <entry>0x17</entry>
- <entry>If the setting is nonzero then devices connected to this board are automatically
- put into local lockout
- mode when brought online with ibfind() or ibdev().</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcSPollTime</entry>
- <entry>0x18</entry>
- <entry>Sets timeout for serial polls. The setting must be
- between 0 and 17, which correspond to the same time periods as in
- <link LINKEND="reference-function-ibtmo">ibtmo()</link>.
- </entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbcPPollTime</entry>
- <entry>0x18</entry>
- <entry>Sets timeout for parallel polls. The setting must be
- between 0 and 17, which correspond to the same time periods as in
- <link LINKEND="reference-function-ibtmo">ibtmo()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcEndBitIsNormal</entry>
- <entry>0x1a</entry>
- <entry>If setting is nonzero then the END bit of ibsta is set on
- reception of the end-of-string character or EOI (default). Otherwise
- END bit is only set on EOI.</entry>
- <entry>board or device</entry>
- </row>
- <row>
- <entry>IbcUnAddr</entry>
- <entry>0x1b</entry>
- <entry>If setting is nonzero then UNT (untalk) and UNL (unlisten) commands
- are automatically sent after a completed io operation using this descriptor.
- This option is off by default.</entry>
- <entry>device</entry>
- </row>
- <row>
- <entry>IbcHSCableLength</entry>
- <entry>0x1f</entry>
- <entry>Useless, included only for compatibility.</entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcIst</entry>
- <entry>0x20</entry>
- <entry>Sets the individual status bit, a.k.a. 'ist'. Same
- as <link LINKEND="reference-function-ibist">ibist()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcRsv</entry>
- <entry>0x21</entry>
- <entry>Sets the current status byte this board will use to respond to
- serial polls. Same as <link LINKEND="reference-function-ibrsv">ibrsv()</link>.
- </entry>
- <entry>board</entry>
- </row>
- <row>
- <entry>IbcBNA</entry>
- <entry>0x200</entry>
- <entry>Changes the GPIB interface board used to access a device. The
- setting specifies the board index of the new access board. This configuration
- option is similar to <link LINKEND="reference-function-ibbna">ibbna()</link>
- except the new board is specified by its board index instead of a name.
- </entry>
- <entry>device</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibdev">
- <refmeta>
- <refentrytitle>ibdev</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibdev</refname>
- <refpurpose>open a device (device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibdev</function></funcdef>
- <paramdef>int <parameter>board_index</parameter></paramdef>
- <paramdef>int <parameter>pad</parameter></paramdef>
- <paramdef>int <parameter>sad</parameter></paramdef>
- <paramdef>int <parameter>timeout</parameter></paramdef>
- <paramdef>int <parameter>send_eoi</parameter></paramdef>
- <paramdef>int <parameter>eos</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibdev() is used to obtain a device descriptor, which can then be used by
- other functions in the library. The argument <parameter>board_index</parameter>
- specifies which GPIB interface board the device is connected to.
- The <parameter>pad</parameter> and <parameter>sad</parameter> arguments specify
- the GPIB address of the device to be opened (see <link LINKEND="reference-function-ibpad">
- ibpad()</link> and <link LINKEND="reference-function-ibsad">ibsad()</link>).
- The timeout for io operations is specified by <parameter> timeout </parameter>
- (see <link LINKEND="reference-function-ibtmo">ibtmo()</link>). If
- <parameter>send_eoi</parameter> is nonzero, then the EOI
- line will be asserted with the last byte sent during writes (see
- <link LINKEND="reference-function-ibeot">ibeot()</link>).
- Finally, the <parameter>eos</parameter>
- argument specifies the end-of-string character and whether or not its
- reception should terminate reads (see <link LINKEND="reference-function-ibeos">
- ibeos()</link>).
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- If sucessful, returns a (non-negative) device descriptor. On failure, -1 is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibeos">
- <refmeta>
- <refentrytitle>ibeos</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibeos</refname>
- <refpurpose>set end-of-string mode (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibeos</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>eosmode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibeos() is used to set the end-of-string character and mode. The least
- significant 8 bits of <parameter>eosmode</parameter> specify the
- eos character. You may also bitwise-or one or more of the following
- bits to set the eos mode:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>End-of-String Mode Bits</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value (hexadecimal)</entry>
- <entry>meaning</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>REOS</entry>
- <entry>0x400</entry>
- <entry>Enable termination of reads when eos character is received.</entry>
- </row>
- <row>
- <entry>XEOS</entry>
- <entry>0x800</entry>
- <entry>Assert the EOI line whenever the eos character is sent during writes.</entry>
- </row>
- <row>
- <entry>BIN</entry>
- <entry>0x1000</entry>
- <entry>Match eos character using all 8 bits (instead of only looking at
- the 7 least significant bits).</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibeot">
- <refmeta>
- <refentrytitle>ibeot</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibeot</refname>
- <refpurpose>assert EOI with last data byte (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibeot</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>send_eoi</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- If <parameter>send_eoi</parameter> is non-zero, then the EOI
- line will be asserted with the last byte sent by
- calls to <link LINKEND="reference-function-ibwrt">ibwrt()</link>
- and related functions.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibevent">
- <refmeta>
- <refentrytitle>ibevent</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibevent</refname>
- <refpurpose>get events from event queue (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibevent</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>short *<parameter>event</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibevent() is used to obtain the oldest event stored in the event
- queue of the board specified by the board descriptor
- <parameter>ud</parameter>. The EVENT bit of
- <link LINKEND="reference-globals-ibsta">ibsta</link> indicates
- that the event queue contains 1 or more events.
- An event may be a clear command, a trigger command, or reception
- of an interface clear. The type of event is stored in the location
- specified by <parameter>event</parameter> and may be set to any of the
- following values:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="0">
- <title>events</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value</entry>
- <entry>description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>EventNone</entry>
- <entry>0</entry>
- <entry>The board's event queue is empty</entry>
- </row>
- <row>
- <entry>EventDevTrg</entry>
- <entry>1</entry>
- <entry>The board has received a trigger command from the controller-in-charge.</entry>
- </row>
- <row>
- <entry>EventDevClr</entry>
- <entry>2</entry>
- <entry>The board has received a clear command from the controller-in-charge.</entry>
- </row>
- <row>
- <entry>EventIFC</entry>
- <entry>3</entry>
- <entry>The board has received an interface clear from the system controller.
- Note, some models of GPIB interface board lack the ability to report interface
- clear events.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- <para>
- The event queue is disabled by default. It may be enabled by a call to
- <link LINKEND="reference-function-ibconfig">ibconfig()</link>.
- Each interface board has a single event queue which is shared across
- all processes and threads. So, only one process can retrieve any given event
- from the queue. Also, the queue is of finite size so events may be lost
- (ibevent() will return an error) if it is neglected too long.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibfind">
- <refmeta>
- <refentrytitle>ibfind</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibfind</refname>
- <refpurpose>open a board or device (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibfind</function></funcdef>
- <paramdef>const char *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibfind() returns a board or device descriptor based on the information
- found in the <link LINKEND="configuration">configuration file</link>.
- It is not required to use this function, since device descriptors
- can be obtained with <link LINKEND="reference-function-ibdev">ibdev()</link>
- and the 'board index' (minor number in the configuration file)
- can be used directly as a board descriptor.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- If sucessful, returns a (non-negative) board or device descriptor.
- On failure, -1 is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibgts">
- <refmeta>
- <refentrytitle>ibgts</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibgts</refname>
- <refpurpose>release ATN (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibgts</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>shadow_handshake</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibgts() is the complement of <link LINKEND="reference-function-ibcac">ibcac()</link>,
- and causes the board specified by the board descriptor <parameter>ud</parameter>
- to go to standby by releasing the ATN line.
- The board must be controller-in-change to change the state of the ATN line.
- If <parameter>shadow_handshake</parameter> is nonzero, then
- the board will handshake any data
- bytes it receives until it encounters an EOI or end-of-string character,
- or the ATN line is asserted again. The received data is discarded.
- </para>
- <para>
- It is generally not necessary to call ibgts(). It is provided
- for advanced users who want direct, low-level access to the GPIB bus.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibist">
- <refmeta>
- <refentrytitle>ibist</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibist</refname>
- <refpurpose>set individual status bit (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibist</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>ist</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- If <parameter>ist</parameter> is nonzero, then the individual status bit
- of the board specified by the board descriptor <parameter>ud</parameter>
- is set. If <parameter>ist</parameter> is zero then the individual status
- bit is cleared. The individual status bit is sent by the board in response
- to parallel polls.
- </para>
- <para>
- On success, <link LINKEND="reference-globals-iberr">iberr</link> is set
- to the previous ist value.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-iblines">
- <refmeta>
- <refentrytitle>iblines</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>iblines</refname>
- <refpurpose>monitor bus lines (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>iblines</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>short *<parameter>line_status</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- iblines() is used to obtain the status of the control and
- handshaking <link LINKEND="gpib-protocol-bus-lines">bus lines</link> of the
- bus. The board used to monitor the bus
- is specified by the <parameter>ud</parameter> argument,
- and the status of the various bus lines are written to
- the location specified by <parameter>line_status</parameter>.
- </para>
- <para>
- Some older chips are not capable of reporting the status
- of the bus lines, so each line has two corresponding bits in
- <parameter>line_status</parameter>. One bit indicates if
- the board can monitor the line, and the other bit indicates
- the line's state.
- The meaning of the <parameter>line_status</parameter> bits are
- as follows:
- </para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="0">
- <title>line status bits</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value</entry>
- <entry>description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>ValidDAV</entry>
- <entry>0x1</entry>
- <entry>The BusDAV bit is valid.</entry>
- </row>
- <row>
- <entry>ValidNDAC</entry>
- <entry>0x2</entry>
- <entry>The BusNDAC bit is valid.</entry>
- </row>
- <row>
- <entry>ValidNRFD</entry>
- <entry>0x4</entry>
- <entry>The BusNRFD bit is valid.</entry>
- </row>
- <row>
- <entry>ValidIFC</entry>
- <entry>0x8</entry>
- <entry>The BusIFC bit is valid.</entry>
- </row>
- <row>
- <entry>ValidREN</entry>
- <entry>0x10</entry>
- <entry>The BusREN bit is valid.</entry>
- </row>
- <row>
- <entry>ValidSRQ</entry>
- <entry>0x20</entry>
- <entry>The BusSRQ bit is valid.</entry>
- </row>
- <row>
- <entry>ValidATN</entry>
- <entry>0x40</entry>
- <entry>The BusATN bit is valid.</entry>
- </row>
- <row>
- <entry>ValidEOI</entry>
- <entry>0x80</entry>
- <entry>The BusEOI bit is valid.</entry>
- </row>
- <row>
- <entry>BusDAV</entry>
- <entry>0x100</entry>
- <entry>Set/cleared if the DAV line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusNDAC</entry>
- <entry>0x200</entry>
- <entry>Set/cleared if the NDAC line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusNRFD</entry>
- <entry>0x400</entry>
- <entry>Set/cleared if the NRFD line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusIFC</entry>
- <entry>0x800</entry>
- <entry>Set/cleared if the IFC line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusREN</entry>
- <entry>0x1000</entry>
- <entry>Set/cleared if the REN line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusSRQ</entry>
- <entry>0x2000</entry>
- <entry>Set/cleared if the SRQ line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusATN</entry>
- <entry>0x4000</entry>
- <entry>Set/cleared if the ATN line is asserted/unasserted.</entry>
- </row>
- <row>
- <entry>BusEOI</entry>
- <entry>0x8000</entry>
- <entry>Set/cleared if the EOI line is asserted/unasserted.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibln">
- <refmeta>
- <refentrytitle>ibln</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibln</refname>
- <refpurpose>check if listener is present (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibln</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>pad</parameter></paramdef>
- <paramdef>int <parameter>sad</parameter></paramdef>
- <paramdef>short *<parameter>found_listener</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibln() checks for the presence of a device, by attempting to address
- it as a listener. <parameter>ud</parameter> specifies the GPIB
- interface board which should check for listeners. If <parameter>ud</parameter>
- is a device descriptor, then the device's access board is used.
- </para>
- <para>
- The GPIB address to check is specified by the
- <parameter>pad</parameter> and <parameter>sad</parameter> arguments.
- <parameter>pad</parameter> specifies the primary address, 0 through 30
- are valid values. <parameter>sad</parameter> gives the secondary
- address, and may be a value from 0x60 through 0x7e (96 through 126), or
- one of the constants NO_SAD or ALL_SAD. NO_SAD indicates that no
- secondary addressing is to be used, and ALL_SAD indicates that
- all secondary addresses should be checked.
- </para>
- <para>
- If the board finds a listener at the specified GPIB address(es), then the
- variable specified by the pointer <parameter>found_listener</parameter>
- is set to a nonzero value. If no listener is found, the variable is set
- to zero.
- </para>
- <para>
- The board must be controller-in-charge to perform this function. Also,
- it must have the capability to monitor the NDAC
- <link LINKEND="gpib-protocol-bus-lines">bus line</link>
- (see <link LINKEND="reference-function-iblines">iblines()</link>).
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibloc">
- <refmeta>
- <refentrytitle>ibloc</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibloc</refname>
- <refpurpose>go to local mode (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibloc</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Causes the board or device specified by the descriptor <parameter>ud</parameter>
- to go to local mode. If <parameter>ud</parameter> is a board descriptor,
- and the board is in local lockout, then the function will fail.
- </para>
- <para>
- Note, if the system controller is asserting the REN line, then devices on
- the bus will
- return to remote mode the next time they are addressed by the controller
- in charge.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibonl">
- <refmeta>
- <refentrytitle>ibonl</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibonl</refname>
- <refpurpose>close or reinitialize descriptor (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibonl</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>online</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- If the <parameter>online</parameter> is zero, then ibonl() frees the
- resources associated with the board or device descriptor
- <parameter>ud</parameter>. The descriptor cannot be used again after the
- ibonl() call.
- </para>
- <para>
- If the <parameter>online</parameter> is nonzero, then all the settings
- associated with the descriptor (GPIB address, end-of-string mode, timeout,
- etc.) are reset to their 'default' values. The 'default' values are
- the settings the descriptor had when it was first obtained with
- <link LINKEND="reference-function-ibdev">ibdev()</link> or
- <link LINKEND="reference-function-ibfind">ibfind()</link>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibpad">
- <refmeta>
- <refentrytitle>ibpad</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibpad</refname>
- <refpurpose>set primary GPIB address (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibpad</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>pad</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibpad() sets the GPIB primary address to <parameter>pad</parameter>
- for the device or board specified by the descriptor <parameter>ud</parameter>.
- If <parameter>ud</parameter> is a device descriptor, then the setting is
- local to the descriptor (it does not affect the behaviour of calls using
- other descriptors, even if they refer to the same physical device). If
- <parameter>ud</parameter> is a board descriptor, then the board's
- primary address is changed immediately, which is a global change affecting
- anything (even other processes) using the board. Valid GPIB primary
- addresses are in the range from 0 to 30.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibpct">
- <refmeta>
- <refentrytitle>ibpct</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibpct</refname>
- <refpurpose>pass control (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibpct</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibpct() passes control to the device specified by the device
- descriptor <parameter>ud</parameter>. The device becomes
- the new controller-in-charge.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibppc">
- <refmeta>
- <refentrytitle>ibppc</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibppc</refname>
- <refpurpose>parallel poll configure (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibppc</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>configuration</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Configures the parallel poll response of the device or board specified
- by <parameter>ud</parameter>. The <parameter>configuration</parameter>
- should either be set to the 'PPD' constant to disable parallel poll
- responses, or set to the return value of the
- <link LINKEND="reference-function-ppe-byte">PPE_byte()</link> inline
- function to enable and
- configure the parallel poll response.
- </para>
- <para>
- After configuring the parallel poll response of devices on a bus,
- you may use
- <link LINKEND="reference-function-ibrpp">ibrpp()</link> to
- parallel poll the devices.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrd">
- <refmeta>
- <refentrytitle>ibrd</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrd</refname>
- <refpurpose>read data bytes (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrd</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>void *<parameter>buffer</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibrd() is used to read data bytes from a device or board. The argument
- <parameter>ud</parameter> can be either a device or board descriptor.
- Up to
- <parameter>num_bytes</parameter> bytes
- are read into the user-supplied array <parameter>buffer</parameter>.
- The read may be terminated by a
- timeout occuring(see <link LINKEND="reference-function-ibtmo">ibtmo()</link>),
- the talker asserting the EOI line, the board receiving the
- end-of-string character (see
- <link LINKEND="reference-function-ibeos">ibeos()</link>), receiving a device
- clear command, or receiving an interface clear.
- </para>
- <para>
- If <parameter>ud</parameter> is a device descriptor, then the library
- automatically handles addressing the device as talker and the interface
- board as listener before performing the read.
- </para>
- <para>
- If <parameter>ud</parameter> is a board descriptor, no addressing
- is performed and the board must be addressed as a listener
- by the controller-in-charge.
- </para>
- <para>
- After the ibrd() call, ibcnt and ibcntl are set to the number of bytes
- read.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrda">
- <refmeta>
- <refentrytitle>ibrda</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrda</refname>
- <refpurpose>read data bytes asynchronously (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrda</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>void *<parameter>buffer</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibrda() is similar to
- <link LINKEND="reference-function-ibrd">ibrd()</link>
- except it operates asynchronously. ibrda() does not
- wait for the reception of the data bytes to complete, but
- rather returns immediately.
- </para>
- <para>
- While an asynchronous
- operation is in progress, most library functions will
- fail with an EOIP error. In order to sucessfully
- complete an
- asynchronous operation, you must call
- <link LINKEND="reference-function-ibwait">ibwait()</link>
- until the CMPL bit is set ibsta. Asynchronous
- operations
- may also be aborted with an
- <link LINKEND="reference-function-ibstop">ibstop()</link>
- or
- <link LINKEND="reference-function-ibonl">ibonl()</link>
- call.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrdf">
- <refmeta>
- <refentrytitle>ibrdf</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrdf</refname>
- <refpurpose>read data bytes to file (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrdf</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const char *<parameter>file_path</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibrdf() is similar to <link LINKEND="reference-function-ibrd">ibrd()</link>
- except that the data bytes read are stored in a file instead
- of an array in memory. <parameter>file_path</parameter> specifies
- the save file. If the file already exists, the data will be appended
- onto the end of the file.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrpp">
- <refmeta>
- <refentrytitle>ibrpp</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrpp</refname>
- <refpurpose>perform a parallel poll (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrpp</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>char *<parameter>ppoll_result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibrpp() causes the interface board to perform a parallel poll, and stores
- the resulting parallel poll byte in the
- location specified by <parameter>ppoll_result</parameter>. Bits 0 to 7
- of the parallel poll byte correspond to the dio lines 1 to 8, with
- a 1 indicating the corresponding dio line is asserted. The devices
- on the bus you wish to poll should be configured beforehand with
- <link LINKEND="reference-function-ibppc">ibppc()</link>. The board
- which performs the parallel poll must be controller-in-charge, and
- is specified by the descriptor <parameter>ud</parameter>.
- If <parameter>ud</parameter> is a device descriptor instead of
- a board descriptor, the device's access board performs the
- parallel poll.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrsc">
- <refmeta>
- <refentrytitle>ibrsc</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrsc</refname>
- <refpurpose>request system control (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrsc</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>request_control</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- If <parameter>request_control</parameter> is nonzero, then the board
- specified by the board descriptor <parameter>ud</parameter> is
- made system controller. If <parameter>request_control</parameter>
- is zero, then the board releases system control.
- </para>
- <para>
- The system controller has the ability
- to assert the REN and IFC lines, and is typically also the
- controller-in-charge. A GPIB bus may not have more than one
- system controller.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrsp">
- <refmeta>
- <refentrytitle>ibrsp</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrsp</refname>
- <refpurpose>conduct serial poll (device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrsp</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>char *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibrsp() serial polls the device specified by <parameter>ud</parameter>.
- The status byte is stored in the location specified by <parameter>result</parameter>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibrsv">
- <refmeta>
- <refentrytitle>ibrsv</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibrsv</refname>
- <refpurpose>request service (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibrsv</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>status_byte</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- The serial poll response byte of the board specified by the board
- descriptor <parameter>ud</parameter> is set to <parameter>status_byte</parameter>.
- If the request service bit (0x40 hexadecimal) in <parameter>status_byte</parameter>
- is set, then the board will also request service by asserting the RQS line.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibsad">
- <refmeta>
- <refentrytitle>ibsad</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibsad</refname>
- <refpurpose>set secondary GPIB address (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibsad</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>sad</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibsad() sets the GPIB secondary address
- of the device or board specified by the descriptor <parameter>ud</parameter>.
- If <parameter>ud</parameter> is a device descriptor, then the setting is
- local to the descriptor (it does not affect the behaviour of calls using
- other descriptors, even if they refer to the same physical device). If
- <parameter>ud</parameter> is a board descriptor, then the board's
- secondary address is changed immediately, which is a global change affecting
- anything (even other processes) using the board.
- </para>
- <para>
- This library follows NI's unfortunate convention of adding 0x60 hexadecimal (96
- decimal) to
- secondary addresses. That is, if you wish to set the secondary address
- to 3, you should set <parameter>sad</parameter> to 0x63. Setting
- <parameter>sad</parameter> to 0 disables the use of secondary addressing.
- Valid GPIB secondary addresses are in the range from 0 to 30 (which correspond
- to <parameter>sad</parameter> values of 0x60 to 0x7e).
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibsic">
- <refmeta>
- <refentrytitle>ibsic</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibsic</refname>
- <refpurpose>perform interface clear (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibsic</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibsic() resets the GPIB bus by asserting the 'interface clear' (IFC)
- bus line
- for a duration of at least 100 microseconds. The board specified
- by <parameter>ud</parameter> must be the system controller
- in order to assert IFC. The interface clear causes all devices
- to untalk and unlisten, puts them into
- serial poll disabled state (don't worry, you will still be able
- to conduct serial polls), and the board becomes
- controller-in-charge.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibsre">
- <refmeta>
- <refentrytitle>ibsre</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibsre</refname>
- <refpurpose>set remote enable (board)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibsre</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>enable</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- If <parameter>enable</parameter> is nonzero, then the board specified
- by the board descriptor <parameter>ud</parameter> asserts the REN line.
- If <parameter>enable</parameter> is zero, the REN line is unasserted.
- The board must be the system controller.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibstop">
- <refmeta>
- <refentrytitle>ibstop</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibstop</refname>
- <refpurpose>abort asynchronous i/o operation (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibstop</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibstop() aborts an asynchronous i/o operation (for example, one
- started with
- <link LINKEND="reference-function-ibcmda">ibcmda()</link>,
- <link LINKEND="reference-function-ibrda">ibrda()</link>, or
- <link LINKEND="reference-function-ibwrta">ibwrta()</link>).
- </para>
- <para>
- The return value of ibstop() is counter-intuitive. On successfully
- aborting an asynchronous operation, the ERR bit is set in
- <link LINKEND="reference-globals-ibsta">ibsta</link>, and
- <link LINKEND="reference-globals-iberr">iberr</link> is
- set to EABO. If the ERR bit is not set in ibsta, then
- there was no asynchronous i/o operation in progress. If the
- function failed, the ERR bit will be set and iberr will be
- set to some value other than EABO.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibtmo">
- <refmeta>
- <refentrytitle>ibtmo</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibtmo</refname>
- <refpurpose>adjust io timeout (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibtmo</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>timeout</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibtmo() sets timeout for IO operations performed using the board
- or device descriptor
- <parameter>ud</parameter>. The actual amount of time before
- a timeout occurs may be greater than the period specified, but
- never less.
- <parameter>timeout</parameter> is specified by using one of
- the following constants:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="0">
- <title>Timeout constants</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value</entry>
- <entry>timeout</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>TNONE</entry>
- <entry>0</entry>
- <entry>Never timeout.</entry>
- </row>
- <row>
- <entry>T10us</entry>
- <entry>1</entry>
- <entry>10 microseconds</entry>
- </row>
- <row>
- <entry>T30us</entry>
- <entry>2</entry>
- <entry>30 microseconds</entry>
- </row>
- <row>
- <entry>T100us</entry>
- <entry>3</entry>
- <entry>100 microseconds</entry>
- </row>
- <row>
- <entry>T300us</entry>
- <entry>4</entry>
- <entry>300 microseconds</entry>
- </row>
- <row>
- <entry>T1ms</entry>
- <entry>5</entry>
- <entry>1 millisecond</entry>
- </row>
- <row>
- <entry>T3ms</entry>
- <entry>6</entry>
- <entry>3 milliseconds</entry>
- </row>
- <row>
- <entry>T10ms</entry>
- <entry>7</entry>
- <entry>10 milliseconds</entry>
- </row>
- <row>
- <entry>T30ms</entry>
- <entry>8</entry>
- <entry>30 milliseconds</entry>
- </row>
- <row>
- <entry>T100ms</entry>
- <entry>9</entry>
- <entry>100 milliseconds</entry>
- </row>
- <row>
- <entry>T300ms</entry>
- <entry>10</entry>
- <entry>300 milliseconds</entry>
- </row>
- <row>
- <entry>T1s</entry>
- <entry>11</entry>
- <entry>1 second</entry>
- </row>
- <row>
- <entry>T3s</entry>
- <entry>12</entry>
- <entry>3 seconds</entry>
- </row>
- <row>
- <entry>T10s</entry>
- <entry>13</entry>
- <entry>10 seconds</entry>
- </row>
- <row>
- <entry>T30s</entry>
- <entry>14</entry>
- <entry>30 seconds</entry>
- </row>
- <row>
- <entry>T100s</entry>
- <entry>15</entry>
- <entry>100 seconds</entry>
- </row>
- <row>
- <entry>T300s</entry>
- <entry>16</entry>
- <entry>300 seconds</entry>
- </row>
- <row>
- <entry>T1000s</entry>
- <entry>17</entry>
- <entry>1000 seconds</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibtrg">
- <refmeta>
- <refentrytitle>ibtrg</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibtrg</refname>
- <refpurpose>trigger device (device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibtrg</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibtrg() sends a GET (group execute trigger)
- <link LINKEND="reference-command-bytes">command byte</link> to the
- device specified by the device descriptor <parameter>ud</parameter>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibwait">
- <refmeta>
- <refentrytitle>ibwait</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibwait</refname>
- <refpurpose>wait for event (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibwait</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>int <parameter>status_mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibwait() will sleep until one of the conditions specified in
- <parameter>status_mask</parameter> is true. The meaning of
- the bits in <parameter>status_mask</parameter> are the same
- as the bits of the <link LINKEND="reference-globals-ibsta">ibsta</link>
- status variable.
- </para>
- <para>
- If <parameter>status_mask</parameter> is zero, then ibwait() will
- return immediately. This is useful if you simply wish to get an
- updated ibsta.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibwrt">
- <refmeta>
- <refentrytitle>ibwrt</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibwrt</refname>
- <refpurpose>write data bytes (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibwrt</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const void *<parameter>data</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibwrt() is used to write data bytes to a device or board. The argument
- <parameter>ud</parameter> can be either a device or board descriptor.
- <parameter>num_bytes</parameter> specifies how many bytes
- are written from the user-supplied array <parameter>data</parameter>.
- EOI may be asserted with the last byte sent or when the end-of-string
- character is sent (see <link LINKEND="reference-function-ibeos">
- ibeos()</link> and <link LINKEND="reference-function-ibeot">
- ibeot()</link>). The write operation
- may be interrupted by a timeout (see <link LINKEND="reference-function-ibtmo">
- ibtmo()</link>), the board receiving a device clear command, or
- receiving an interface clear.
- </para>
- <para>
- If <parameter>ud</parameter> is a device descriptor, then the library
- automatically handles addressing the device as listener and the interface
- board as talker, before sending the data bytes onto the bus.
- </para>
- <para>
- If <parameter>ud</parameter>
- is a board descriptor, the board simply writes the data onto the bus. The
- controller-in-charge must address the board as talker.
- </para>
- <para>
- After the ibwrt() call, ibcnt and ibcntl are set to the number of bytes
- written.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibwrta">
- <refmeta>
- <refentrytitle>ibwrta</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibwrta</refname>
- <refpurpose>write data bytes asynchronously (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibwrta</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const void *<parameter>buffer</parameter></paramdef>
- <paramdef>long <parameter>num_bytes</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibwrta() is similar to
- <link LINKEND="reference-function-ibwrt">ibwrt()</link>
- except it operates asynchronously. ibwrta() does not
- wait for the sending of the data bytes to complete, but
- rather returns immediately.
- </para>
- <para>
- While an asynchronous
- operation is in progress, most library functions will
- fail with an EOIP error. In order to sucessfully
- complete an
- asynchronous operation, you must call
- <link LINKEND="reference-function-ibwait">ibwait()</link>
- and until the CMPL bit is set ibsta. Asynchronous
- operations
- may also be aborted with an
- <link LINKEND="reference-function-ibstop">ibstop()</link>
- or
- <link LINKEND="reference-function-ibonl">ibonl()</link>
- call.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ibwrtf">
- <refmeta>
- <refentrytitle>ibwrtf</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ibwrtf</refname>
- <refpurpose>write data bytes from file (board or device)</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ibwrtf</function></funcdef>
- <paramdef>int <parameter>ud</parameter></paramdef>
- <paramdef>const char *<parameter>file_path</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ibwrtf() is similar to <link LINKEND="reference-function-ibwrt">ibwrt()</link>
- except that the data to be written is taken from a file instead
- of an array in memory. <parameter>file_path</parameter> specifies
- the file, which is written byte for byte onto the bus.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link> is returned.
- </para>
- </refsect1>
- </refentry>
- </section>
- <section>
- <title>
- "Multidevice" API Functions
- </title>
- <para>
- The "Multidevice" API functions provide similar functionality to the "Traditional" API functions.
- However, some of the "multidevice" functions can be
- to be performed on multiple devices simultaneously. For example,
- <link LINKEND="reference-function-sendlist">SendList()</link>
- can be used to write a message to multiple devices. Such functions take an array of Addr4882_t
- as an argument. The end of the array is specified by setting the last element to the
- constant NOADDR.
- </para>
- <refentry ID="reference-function-allspoll">
- <refmeta>
- <refentrytitle>AllSPoll</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>AllSPoll</refname>
- <refpurpose>serial poll multiple devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>AllSPoll</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t *<parameter>addressList</parameter></paramdef>
- <paramdef>short *<parameter>resultList</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>AllSpoll</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t *<parameter>addressList</parameter></paramdef>
- <paramdef>short *<parameter>resultList</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- AllSPoll() causes the interface board specified by <parameter>board_desc</parameter>
- to serial poll all the GPIB addresses specified in the <parameter>addressList</parameter>
- array. The results of the serial polls are stored into <parameter>resultList</parameter>.
- If you only wish to serial poll a single device,
- <link LINKEND="reference-function-readstatusbyte">ReadStatusByte()</link> or
- <link LINKEND="reference-function-ibrsp">ibrsp()</link> may be
- more convenient.
- </para>
- <para>
- This function may also be invoked with the alternate capitalization 'AllSpoll'
- for compatibility with NI's library.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-devclear">
- <refmeta>
- <refentrytitle>DevClear</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>DevClear</refname>
- <refpurpose>clear a device</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>DevClear</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- DevClear() causes the interface board specified by <parameter>board_desc</parameter>
- to send the clear command to the GPIB addresses specified by <parameter>address</parameter>. The results of the serial polls are stored into <parameter>resultList</parameter>.
- If you wish to clear multiple devices simultaneously, use
- <link LINKEND="reference-function-devclearlist">DevClearList()</link>
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-devclearlist">
- <refmeta>
- <refentrytitle>DevClearList</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>DevClearList</refname>
- <refpurpose>clear multiple devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>DevClearList</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- DevClear() causes the interface board specified by <parameter>board_desc</parameter>
- to send the clear command simultaneously to all the GPIB addresses specified by the
- <parameter>addressList</parameter> array. If <parameter>addressList</parameter> is
- empty or NULL, then the clear command is sent to all devices on the bus.
- If you only wish to clear a single device,
- <link LINKEND="reference-function-devclear">DevClear()</link>
- or <link LINKEND="reference-function-ibclr">ibclr()</link> may
- be slightly more convenient.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-enablelocal">
- <refmeta>
- <refentrytitle>EnableLocal</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>EnableLocal</refname>
- <refpurpose>put devices into local mode.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>EnableLocal</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- EnableLocal() addresses
- all of the devices in the <parameter>addressList</parameter> array as listeners
- then sends the GTL (go to local) command byte, causing them to enter local mode.
- This requires that the board is the controller-in-charge.
- Note that while the REN (remote enable) bus line is asserted, the devices
- will return to remote mode the next time they are addressed.
- </para>
- <para>
- If <parameter>addressList</parameter> is empty or NULL, then the REN
- line is unasserted and all devices enter local mode. The board must
- be system controller to change the state of the REN line.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-enableremote">
- <refmeta>
- <refentrytitle>EnableRemote</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>EnableRemote</refname>
- <refpurpose>put devices into remote mode.</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>EnableRemote</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- EnableRemote() asserts the REN (remote enable) line, and addresses
- all of the devices
- in the <parameter>addressList</parameter> array as listeners (causing
- them to enter remote mode). The board must be system controller.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-findlstn">
- <refmeta>
- <refentrytitle>FindLstn</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>FindLstn</refname>
- <refpurpose>find devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>FindLstn</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>padList[]</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>resultList[]</parameter></paramdef>
- <paramdef>int <parameter>maxNumResults</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- FindLstn() will check the primary addresses in the <parameter>padList</parameter>
- array for devices. The GPIB addresses of all devices found will be stored in the
- <parameter>resultList</parameter> array, and
- <link LINKEND="reference-globals-ibcnt">ibcnt</link>
- will be set to the number
- of devices found. The <parameter>maxNumResults</parameter> parameter
- limits the maximum number of results that will be returned, and is usually
- set to the number of elements in the <parameter>resultList</parameter> array.
- If more than <parameter>maxNumResults</parameter> devices are found, an
- ETAB error is returned in <link LINKEND="reference-globals-iberr">iberr</link>.
- The <parameter>padList</parameter> should consist of primary addresses only,
- with no secondary addresses (all possible secondary addresses will be checked
- as necessary).
- </para>
- <para>
- Your GPIB board must have the capability to monitor the NDAC bus line in order
- to use this function (see <link LINKEND="reference-function-iblines">iblines</link>).
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-findrqs">
- <refmeta>
- <refentrytitle>FindRQS</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>FindRQS</refname>
- <refpurpose>find device requesting service and read its status byte</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>FindRQS</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- <paramdef>short *<parameter>status</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- FindRQS will serial poll the GPIB addresses specified in the
- <parameter>addressList</parameter> array until it finds a device
- requesting service. The status byte of the device requesting
- service is stored in the location specified by <parameter>status</parameter>.
- The <parameter>addressList</parameter> array index of the device requesting
- service is returned in <link LINKEND="reference-globals-ibcnt">ibcnt</link>.
- If no device requesting service is found,
- an ETAB error is returned in <link LINKEND="reference-globals-iberr">iberr</link>.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-passcontrol">
- <refmeta>
- <refentrytitle>PassControl</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>PassControl</refname>
- <refpurpose>make device controller-in-charge</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>PassControl</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- PassControl() causes the board specified by <parameter>board_desc</parameter>
- to pass control to the device specified by <parameter>address</parameter>.
- On success, the device becomes the new controller-in-charge.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ppoll">
- <refmeta>
- <refentrytitle>PPoll</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>PPoll</refname>
- <refpurpose>parallel poll devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>PPoll</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>short *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- PPoll() is similar to the 'traditional' API function
- <link LINKEND="reference-function-ibrpp">ibrpp()</link>.
- It causes the interface board to perform a parallel poll, and stores
- the parallel poll byte in the
- location specified by <parameter>result</parameter>. Bits 0 to 7
- of the parallel poll byte correspond to the dio lines 1 to 8, with
- a 1 indicating the corresponding dio line is asserted. The devices
- on the bus you wish to poll should be configured beforehand with
- <link LINKEND="reference-function-ppollconfig">PPollConfig()</link>.
- The board must be controller-in-charge to perform a parallel poll.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ppollconfig">
- <refmeta>
- <refentrytitle>PPollConfig</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>PPollConfig</refname>
- <refpurpose>configure a device's parallel poll response</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>PPollConfig</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- <paramdef>int <parameter>dio_line</parameter></paramdef>
- <paramdef>int <parameter>line_sense</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- PPollConfig() configures the device specified by <parameter>address</parameter>
- to respond to parallel polls.
- The <parameter>dio_line</parameter> (valid values are 1 through 8)
- specifies which dio line the device being configured should use to send
- back its parallel poll response. The <parameter>line_sense</parameter> argument
- specifies the polarity of the response. If <parameter>line_sense</parameter>
- is nonzero, then the specified dio line will be asserted to indicate
- that the 'individual status bit' (or 'ist') is 1. If <parameter>sense</parameter>
- is zero, then the specified dio line will be asserted when ist is zero.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ppollunconfig">
- <refmeta>
- <refentrytitle>PPollUnconfig</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>PPollUnconfig</refname>
- <refpurpose>disable devices' parallel poll response</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>PPollUnconfig</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- PPollUnconfig() configures the devices specified by <parameter>addressList</parameter>
- to ignore parallel polls.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-rcvrespmsg">
- <refmeta>
- <refentrytitle>RcvRespMsg</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>RcvRespMsg</refname>
- <refpurpose>read data</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>RcvRespMsg</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>void *<parameter>buffer</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- <paramdef>int <parameter>termination</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- RcvRespMsg() reads data from the bus.
- A device must have already been addressed as talker (and the
- board as listener) before calling this function. Addressing may
- be accomplished with the
- <link LINKEND="reference-function-receivesetup">ReceiveSetup()</link>
- function.
- </para>
- <para>
- Up to <parameter>count</parameter> bytes are read into the array
- specified by <parameter>buffer</parameter>. The <parameter>termination</parameter>
- argument specifies the 8-bit end-of-string character (which must
- be a value from 0 to 255) whose
- reception will terminate a read. <parameter>termination</parameter>
- can also be set to the 'STOPend' constant, in which case no
- end-of-string character will be used. Assertion of the EOI line
- will always end a read.
- </para>
- <para>
- You may find it simpler to use the slightly higher level function
- <link LINKEND="reference-function-receive">Receive()</link>, since
- it does not require
- addressing and reading of data to be performed separately.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-readstatusbyte">
- <refmeta>
- <refentrytitle>ReadStatusByte</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ReadStatusByte</refname>
- <refpurpose>serial poll a device</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>ReadStatusByte</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- <paramdef>short *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ReadStatusByte() causes the board specified by
- the board descriptor <parameter>board_desc</parameter> to serial poll
- the GPIB address specified by <parameter>address</parameter>. The
- status byte is stored at the location specified by the <parameter>result</parameter>
- pointer. If you wish to serial poll multiple devices, it
- may be slightly more efficient to use
- <link LINKEND="reference-function-allspoll">AllSPoll()</link>.
- Serial polls may also be conducted with the 'traditional API' function
- <link LINKEND="reference-function-ibrsp">ibrsp()</link>.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-receive">
- <refmeta>
- <refentrytitle>Receive</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>Receive</refname>
- <refpurpose>perform receive addressing and read data</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>Receive</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- <paramdef>void *<parameter>buffer</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- <paramdef>int <parameter>termination</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Receive() performs the necessary addressing, then reads data from the device
- specified by <parameter>address</parameter>.
- It is equivalent to a
- <link LINKEND="reference-function-receivesetup">ReceiveSetup()</link>
- call followed by a
- <link LINKEND="reference-function-rcvrespmsg">RcvRespMsg()</link>
- call.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-receivesetup">
- <refmeta>
- <refentrytitle>ReceiveSetup</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ReceiveSetup</refname>
- <refpurpose>perform receive addressing</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>ReceiveSetup</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ReceiveSetup() addresses the device specified by <parameter>address</parameter>
- as talker, and addresses the interface board as listener. A subsequent
- <link LINKEND="reference-function-rcvrespmsg">RcvRespMsg()</link> call
- will read data from the device.
- </para>
- <para>
- You may find it simpler to use the slightly higher level function
- <link LINKEND="reference-function-receive">Receive()</link>, since
- it does not require
- addressing and reading of data to be performed separately.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-resetsys">
- <refmeta>
- <refentrytitle>ResetSys</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ResetSys</refname>
- <refpurpose>reset system</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>ResetSys</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ResetSys() has the following effects:
- <itemizedlist>
- <listitem>
- <para>
- The remote enable bus line is asserted.
- </para>
- </listitem>
- <listitem>
- <para>
- An interface clear is performed (the interface clear bus line is asserted
- for at least 100 microseconds).
- </para>
- </listitem>
- <listitem>
- <para>
- The device clear command is sent to all the devices on the bus.
- </para>
- </listitem>
- <listitem>
- <para>
- The *RST message is sent to every device specified in the <parameter>addressList</parameter>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-send">
- <refmeta>
- <refentrytitle>Send</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>Send</refname>
- <refpurpose>perform send addressing and write data</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>Send</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- <paramdef>const void *<parameter>data</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- <paramdef>int <parameter>eot_mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Send() addresses the device specified by <parameter>address</parameter>
- as listener, then writes data onto the bus.
- It is equivalent to a
- <link LINKEND="reference-function-sendlist">SendList()</link>
- except it only uses a single GPIB address to specify the listener
- instead of allowing an array of listeners.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-sendcmds">
- <refmeta>
- <refentrytitle>SendCmds</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendCmds</refname>
- <refpurpose>write command bytes onto bus</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendCmds</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const void *<parameter>cmds</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendCmds() writes <parameter>count</parameter>
- <link LINKEND="reference-command-bytes">command byte</link>
- onto the
- the GPIB bus from the array <parameter>cmds</parameter>.
- </para>
- <para>
- It is generally not necessary to call SendCmds(). It is provided
- for advanced users who want direct, low-level access to the GPIB bus.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-senddatabytes">
- <refmeta>
- <refentrytitle>SendDataBytes</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendDataBytes</refname>
- <refpurpose>write data</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendDataBytes</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const void *<parameter>data</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- <paramdef>int <parameter>eot_mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendDataBytes() writes data to the bus.
- One or more devices must have already been addressed as listener (and the
- board as talker) before calling this function. Addressing may
- be accomplished with the
- <link LINKEND="reference-function-sendsetup">SendSetup()</link>
- function.
- </para>
- <para>
- <parameter>count</parameter> bytes are written from the array
- specified by <parameter>data</parameter>. The <parameter>eot_mode</parameter>
- argument specifies how the message should be terminated, and may be any of
- the following values:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="0">
- <title>eot modes</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>constant</entry>
- <entry>value</entry>
- <entry>description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>NULLend</entry>
- <entry>0</entry>
- <entry>Do not assert EOI or add a newline at the end of the write.</entry>
- </row>
- <row>
- <entry>DABend</entry>
- <entry>1</entry>
- <entry>Assert EOI with the last byte of the write.</entry>
- </row>
- <row>
- <entry>NLend</entry>
- <entry>2</entry>
- <entry>Append a newline, and assert EOI with the newline at the end of the write.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- <para>
- You may find it simpler to use the slightly higher level functions
- <link LINKEND="reference-function-send">Send()</link> or
- <link LINKEND="reference-function-sendlist">SendList()</link>, since
- they does not require
- addressing and writing of data to be performed separately.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-sendifc">
- <refmeta>
- <refentrytitle>SendIFC</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendIFC</refname>
- <refpurpose>perform interface clear</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendIFC</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendIFC() resets the GPIB bus by asserting the 'interface clear' (IFC)
- bus line
- for a duration of at least 100 microseconds. The board specified
- by <parameter>board_desc</parameter> must be the system controller
- in order to assert IFC. The interface clear causes all devices
- to untalk and unlisten, puts them into
- serial poll disabled state (don't worry, you will still be able
- to conduct serial polls), and the board becomes
- controller-in-charge.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-sendlist">
- <refmeta>
- <refentrytitle>SendList</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendList</refname>
- <refpurpose>write data to multiple devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendList</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- <paramdef>const void *<parameter>data</parameter></paramdef>
- <paramdef>long <parameter>count</parameter></paramdef>
- <paramdef>int <parameter>eot_mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendList() addresses the devices in <parameter>addressList</parameter>
- as listeners, then writes the contents of the array <parameter>data</parameter>
- to them.
- It is equivalent to a
- <link LINKEND="reference-function-sendsetup">SendSetup()</link>
- call followed by a
- <link LINKEND="reference-function-senddatabytes">SendDataBytes()</link>
- call.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-sendllo">
- <refmeta>
- <refentrytitle>SendLLO</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendLLO</refname>
- <refpurpose>put devices into local lockout mode</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendLLO</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendLLO() asserts the 'remote enable' bus line, then sends the
- LLO
- <link LINKEND="reference-command-bytes">command byte</link>.
- Any devices currently addressed as listener will be put into
- RWLS (remote with lockout state), and all other devices
- will enter LWLS (local with lockout state). Local lockout means
- the remote/local mode of devices cannot be changed though the
- devices' front-panel controls. Unasserting the REN line should
- bring the devices out of lockout state.
- </para>
- <para>
- The
- <link LINKEND="reference-function-setrwls">SetRWLS()</link>
- performs a similar function, except it lets you
- specifiy which devices you wish to address as listener before
- sending the LLO command.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-sendsetup">
- <refmeta>
- <refentrytitle>SendSetup</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SendSetup</refname>
- <refpurpose>perform send addressing</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SendSetup</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SendSetup() addresses the devices in <parameter>addressList</parameter>
- as listeners, and addresses the interface board as talker.
- A subsequent
- <link LINKEND="reference-function-senddatabytes">SendDataBytes()</link> call
- will write data to the devices.
- </para>
- <para>
- You may find it simpler to use the slightly higher level functions
- <link LINKEND="reference-function-send">Send()</link> or
- <link LINKEND="reference-function-sendlist">SendList()</link>, since
- they does not require
- addressing and writing of data to be performed separately.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-setrwls">
- <refmeta>
- <refentrytitle>SetRWLS</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>SetRWLS</refname>
- <refpurpose>put devices into remote with lockout state</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>SetRWLS</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- SetRWLS() asserts the 'remote enable' bus line,
- addresses the devices in the <parameter>addressList</parameter>
- array as listeners, then sends the
- LLO
- <link LINKEND="reference-command-bytes">command byte</link>.
- The devices addressed as listener will be put into
- RWLS (remote with lockout state), and all other devices
- will enter LWLS (local with lockout state). Local lockout means
- the remote/local mode of devices cannot be changed though the
- devices' front-panel controls. Unasserting the REN line should
- bring the devices out of the lockout state.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-testsrq">
- <refmeta>
- <refentrytitle>TestSRQ</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>TestSRQ</refname>
- <refpurpose>query state of SRQ bus line</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>TestSRQ</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>short *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- TestSRQ() checks the state of the SRQ
- <link LINKEND="gpib-protocol-bus-lines">bus line</link> and
- writes its state to the location specified by <parameter>result</parameter>.
- A '1' indicates the SRQ line is asserted, and a '0' indicates
- the line is not asserted.
- </para>
- <para>
- Some boards lack the capability to report the status of the SRQ
- line. In such a case, an ECAP error is returned in
- <link LINKEND="reference-globals-iberr">iberr</link>.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-testsys">
- <refmeta>
- <refentrytitle>TestSys</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>TestSys</refname>
- <refpurpose>perform self-test queries on devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>TestSys</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>const Addr4882_t <parameter>addressList[]</parameter></paramdef>
- <paramdef>short <parameter>results[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- TestSys() sends the '*TST?' message to all the devices in the
- <parameter>addressList</parameter> array, then reads their
- responses into the <parameter>results</parameter> array.
- This will cause devices that conform to the IEEE 488.2 standard
- to perform a self-test and respond with a zero on success.
- A non-zero response indicates an error during the self-test.
- </para>
- <para>
- The number of devices which responded with nonzero values from
- their self-tests is returned in
- <link LINKEND="reference-globals-ibcnt">ibcnt and ibcntl</link>.
- If a device fails to respond to the *TST? query, an error
- will be flagged in
- <link LINKEND="reference-globals-ibsta">ibsta</link> (this
- is different than NI's documented behaviour which is broken).
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-trigger">
- <refmeta>
- <refentrytitle>Trigger</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>Trigger</refname>
- <refpurpose>trigger a device</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>Trigger</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- Trigger() is equivalent to a
- <link LINKEND="reference-function-triggerlist">TriggerList()</link>
- call with a single address.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-triggerlist">
- <refmeta>
- <refentrytitle>TriggerList</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>Trigger</refname>
- <refpurpose>trigger multiple devices</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>TriggerList</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>Addr4882_t <parameter>addressList[]</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- TriggerList() sends a GET (group execute trigger)
- <link LINKEND="reference-command-bytes">command byte</link> to all
- the
- devices specified in the <parameter>addressList</parameter> array.
- If no addresses are specified in <parameter>addressList</parameter>
- then the GET command byte is sent without performing any addressing.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-waitsrq">
- <refmeta>
- <refentrytitle>WaitSRQ</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>WaitSRQ</refname>
- <refpurpose>sleep until the SRQ bus line is asserted</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>void <function>WaitSRQ</function></funcdef>
- <paramdef>int <parameter>board_desc</parameter></paramdef>
- <paramdef>short *<parameter>result</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- WaitSRQ() sleeps until either the SRQ
- <link LINKEND="gpib-protocol-bus-lines">bus line</link> is
- asserted, or a timeout (see <link LINKEND="reference-function-ibtmo">ibtmo()</link>)
- occurs. A '1' will be written to the location specified by
- <parameter>result</parameter> if SRQ was asserted, and a
- '0' will be written if the function timed out.
- </para>
- </refsect1>
- </refentry>
- </section>
- <section>
- <title>
- Utility Functions
- </title>
- <refentry ID="reference-function-get-pad">
- <refmeta>
- <refentrytitle>GetPAD</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>GetPAD</refname>
- <refpurpose>extract primary address from an Addr4882_t value</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>static __inline__ unsigned int <function>GetPAD</function></funcdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- GetPAD() extracts the primary address packed into the Addr4882_t
- value <parameter>address</parameter>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The primary GPIB address (from 0 through 30) stored in <parameter>address</parameter>.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-get-sad">
- <refmeta>
- <refentrytitle>GetSAD</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>GetSAD</refname>
- <refpurpose>extract secondary address from an Addr4882_t value</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>static __inline__ unsigned int <function>GetSAD</function></funcdef>
- <paramdef>Addr4882_t <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- GetSAD() extracts the secondary address packed into the Addr4882_t
- value <parameter>address</parameter>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The secondary GPIB address (from 0x60 through 0x7e, or 0 for none) stored in
- <parameter>address</parameter>.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-make-addr">
- <refmeta>
- <refentrytitle>MakeAddr</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>MakeAddr</refname>
- <refpurpose>pack primary and secondary address into an Addr4882_t value</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>static __inline__ Addr4882_t <function>MakeAddr</function></funcdef>
- <paramdef>unsigned int <parameter>pad</parameter></paramdef>
- <paramdef>unsigned int <parameter>sad</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- MakeAddr() generates an Addr4882_t value that corresponds to the
- specified primary address <parameter>pad</parameter> and secondary
- address <parameter>sad</parameter>. It does so by putting
- <parameter>pad</parameter> into the least significant byte and
- left shifting <parameter>sad</parameter> up to the next byte.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Examples
- </title>
- <programlisting>
- Addr4882_t addressList[ 5 ];
- addressList[ 0 ] = 5 /* primary address 5, no secondary address */
- addressList[ 1 ] = MakeAddr(3, 0); /* primary address 3, no secondary address */
- addressList[ 2 ] = MakeAddr(7, 0x70); /* primary address 3, secondary address 16 */
- addressList[ 3 ] = MakeAddr(20, MSA(9)); /* primary address 20, secondary address 9 */
- addressList[ 4 ] = NOADDR;
- </programlisting>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- An Addr4882_t value corresponding to the specified primary and
- secondary GPIB address.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-mla">
- <refmeta>
- <refentrytitle>MLA</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>MLA</refname>
- <refpurpose>generate 'my listen address' command byte</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>uint8_t <function>MLA</function></funcdef>
- <paramdef>unsigned int <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- MLA() returns a 'my listen address'
- <link LINKEND="reference-command-bytes">command byte</link> corresponding
- to the <parameter>address</parameter> argument. The <parameter>address</parameter>
- my be between 0 and 30.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The appropriate MLA command byte is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-msa">
- <refmeta>
- <refentrytitle>MSA</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>MSA</refname>
- <refpurpose>generate 'my secondary address' command byte</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>uint8_t <function>MSA</function></funcdef>
- <paramdef>unsigned int <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- MSA() returns a 'my secondary address'
- <link LINKEND="reference-command-bytes">command byte</link> corresponding
- to the <parameter>address</parameter> argument. The <parameter>address</parameter>
- my be between 0 and 30. This macro is also useful for mangling
- secondary addresses from the 'real' values between 0 and 30 to the
- range 0x60 to 0x7e used by most of the library's functions.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The appropriate MSA command byte is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-mta">
- <refmeta>
- <refentrytitle>MTA</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>MTA</refname>
- <refpurpose>generate 'my talk address' command byte</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>uint8_t <function>MTA</function></funcdef>
- <paramdef>unsigned int <parameter>address</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- MTA() returns a 'my talk address'
- <link LINKEND="reference-command-bytes">command byte</link> corresponding
- to the <parameter>address</parameter> argument. The <parameter>address</parameter>
- my be between 0 and 30.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The appropriate MTA command byte is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-ppe-byte">
- <refmeta>
- <refentrytitle>PPE_byte</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>PPE_byte</refname>
- <refpurpose>generate 'parallel poll enable' command byte</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>uint8_t <function>PPE_byte</function></funcdef>
- <paramdef>unsigned int <parameter>dio_line</parameter></paramdef>
- <paramdef>int <parameter>sense</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- PPE_byte() returns a 'parallel poll enable'
- <link LINKEND="reference-command-bytes">command byte</link> corresponding
- to the <parameter>dio_line</parameter> and <parameter>sense</parameter>
- arguments. The <parameter>dio_line</parameter> (valid values are 1 through 8)
- specifies which dio line the device being configured should use to send
- back its parallel poll response. The <parameter>sense</parameter> argument
- specifies the polarity of the response. If <parameter>sense</parameter>
- is nonzero, then the specified dio line will be asserted to indicate
- that the 'individual status bit' (or 'ist') is 1. If <parameter>sense</parameter>
- is zero, then the specified dio line will be asserted when ist is zero.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The appropriate PPE command byte is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-thread-ibcnt">
- <refmeta>
- <refentrytitle>ThreadIbcnt and ThreadIbcntl</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ThreadIbcnt and ThreadIbcntl</refname>
- <refpurpose>thread-specific ibcnt and ibcntl values</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ThreadIbcnt</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>long <function>ThreadIbcntl</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ThreadIbcnt() and ThreadIbcntl() return thread-local versions
- of the global
- variables <link LINKEND="reference-globals-ibcnt">ibcnt and ibcntl</link>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibcnt">ibcnt or ibcntl</link>
- corresponding to the last 'traditional' or 'multidevice' function
- called in the current thread is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-thread-iberr">
- <refmeta>
- <refentrytitle>ThreadIberr</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ThreadIberr</refname>
- <refpurpose>thread-specific iberr value</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ThreadIberr</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ThreadIberr() returns a thread-local version of the global
- variable <link LINKEND="reference-globals-iberr">iberr</link>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-iberr">iberr</link>
- corresponding to the last 'traditional' or 'multidevice' function
- called by the current thread is returned.
- </para>
- </refsect1>
- </refentry>
- <refentry ID="reference-function-thread-ibsta">
- <refmeta>
- <refentrytitle>ThreadIbsta</refentrytitle>
- <manvolnum>3</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>ThreadIbsta</refname>
- <refpurpose>thread-specific ibsta value</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <funcsynopsis>
- <funcsynopsisinfo>#include <gpib/ib.h></funcsynopsisinfo>
- <funcprototype>
- <funcdef>int <function>ThreadIbsta</function></funcdef>
- <paramdef>void</paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>
- Description
- </title>
- <para>
- ThreadIbsta() returns a thread-local version of the global
- variable <link LINKEND="reference-globals-ibsta">ibsta</link>.
- </para>
- </refsect1>
- <refsect1>
- <title>
- Return value
- </title>
- <para>
- The value of <link LINKEND="reference-globals-ibsta">ibsta</link>
- corresponding to the last 'traditional' or 'multidevice' function
- called by the current thread is returned.
- </para>
- </refsect1>
- </refentry>
- </section>
- </section>
- <section ID="gpib-protocol">
- <title>GPIB protocol</title>
- <section ID="reference-command-bytes">
- <title>GPIB command bytes</title>
- <para>
- The meaning and values of the possible GPIB command bytes
- are as follows:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>GPIB command bytes</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>byte value (hexadecimal)</entry>
- <entry>name</entry>
- <entry>description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>0x1</entry>
- <entry>GTL</entry>
- <entry>Go to local</entry>
- </row>
- <row>
- <entry>0x4</entry>
- <entry>SDC</entry>
- <entry>Selected device clear</entry>
- </row>
- <row>
- <entry>0x5</entry>
- <entry>PPConfig (also 'PPC' on non-powerpc architectures)</entry>
- <entry>Parallel poll configure</entry>
- </row>
- <row>
- <entry>0x8</entry>
- <entry>GET</entry>
- <entry>Group execute trigger</entry>
- </row>
- <row>
- <entry>0x9</entry>
- <entry>TCT</entry>
- <entry>Take control</entry>
- </row>
- <row>
- <entry>0x11</entry>
- <entry>LLO</entry>
- <entry>Local lockout</entry>
- </row>
- <row>
- <entry>0x14</entry>
- <entry>DCL</entry>
- <entry>Device clear</entry>
- </row>
- <row>
- <entry>0x15</entry>
- <entry>PPU</entry>
- <entry>Parallel poll unconfigure</entry>
- </row>
- <row>
- <entry>0x18</entry>
- <entry>SPE</entry>
- <entry>Serial poll enable</entry>
- </row>
- <row>
- <entry>0x19</entry>
- <entry>SPD</entry>
- <entry>Serial poll disable</entry>
- </row>
- <row>
- <entry>0x20 to 0x3e</entry>
- <entry>MLA0 to MLA30</entry>
- <entry>My (primary) listen address 0 to 30</entry>
- </row>
- <row>
- <entry>0x3f</entry>
- <entry>UNL</entry>
- <entry>Unlisten</entry>
- </row>
- <row>
- <entry>0x40 to 0x5e</entry>
- <entry>MTA0 to MTA30</entry>
- <entry>My (primary) talk address 0 to 30</entry>
- </row>
- <row>
- <entry>0x5f</entry>
- <entry>UNT</entry>
- <entry>Untalk</entry>
- </row>
- <row>
- <entry>0x60 to 0x6f</entry>
- <entry>MSA0 to MSA15, also PPE</entry>
- <entry>When following a talk or listen address, this is
- 'my secondary address' 0 to 15. When following a parallel
- poll configure, this is 'parallel poll enable'. For
- parallel poll enable, the least significant 3 bits
- of the command byte specify which DIO line the device
- should use to send its parallel poll response. The
- fourth least significant bit (0x8)
- indicates the 'sense' or polarity the device should use
- when responding.
- </entry>
- </row>
- <row>
- <entry>0x70 to 0x7d</entry>
- <entry>MSA16 to MSA29, also PPD</entry>
- <entry>When following a talk or listen address, this is
- 'my secondary address' 16 to 29. When following a parallel
- poll configure, this is 'parallel poll disable'.</entry>
- </row>
- <row>
- <entry>0x7e</entry>
- <entry>MSA30</entry>
- <entry>My secondary address 30</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </section>
- <section ID="gpib-protocol-bus-lines">
- <title>GPIB bus lines</title>
- <para>
- Physically, the GPIB bus consists of 8 data lines, 3 handshaking
- lines, and 5 control lines (and 8 ground
- lines). Brief descriptions
- of how they are used follow:
- </para>
- <para>
- <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
- <title>GPIB bus lines</title>
- <tgroup COLS="3" ALIGN="left" >
- <thead>
- <row>
- <entry>bus line</entry>
- <entry>description</entry>
- <entry>pin number</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>DIO1 through DIO8</entry>
- <entry>Data input/output bits. These 8 lines are used to read and write the 8 bits
- of a data or command byte that is being sent over the bus.</entry>
- <entry>DIO1 to DIO4 use pins 1 to 4, DIO5 to DIO8 use pins 13 to 16</entry>
- </row>
- <row>
- <entry>EOI</entry>
- <entry>End-or-identify. This line is asserted with the last byte of
- data during a write, to indicate the end of the message. It can
- also be asserted along with the ATN line to conduct a parallel poll.</entry>
- <entry>5</entry>
- </row>
- <row>
- <entry>DAV</entry>
- <entry>Data valid. This is a handshaking line, used to signal that
- the value being sent with DIO1-DIO8 is valid. During transfers the
- DIO1-DIO8 lines are set, then the DAV line is asserted after
- a delay called the 'T1 delay'. The T1 delay lets the data lines
- settle to stable values before they are read.</entry>
- <entry>6</entry>
- </row>
- <row>
- <entry>NRFD</entry>
- <entry>Not ready for data. NRFD is a handshaking line asserted by
- listeners to indicate
- they are not ready to receive a new data byte.</entry>
- <entry>7</entry>
- </row>
- <row>
- <entry>NDAC</entry>
- <entry>Not data accepted. NDAC is a handshaking line asserted by
- listeners to indicate
- they have not yet read the byte contained on the DIO lines.</entry>
- <entry>8</entry>
- </row>
- <row>
- <entry>IFC</entry>
- <entry>Interface clear. The system controller can assert this line
- (it should be asserted for at least 100 microseconds) to reset
- the bus and make itself controller-in-charge.</entry>
- <entry>9</entry>
- </row>
- <row>
- <entry>SRQ</entry>
- <entry>Service request. Devices on the bus can assert this line
- to request service from the controller-in-charge. The controller
- can then poll the devices until it finds the device requesting
- service, and perform whatever action is necessary.</entry>
- <entry>10</entry>
- </row>
- <row>
- <entry>ATN</entry>
- <entry>Attention. ATN is asserted to indicate that the DIO lines
- contain a <link LINKEND="reference-command-bytes">command byte</link>
- (as opposed to a data byte). Also, it is asserted with EOI
- when conducting parallel polls.</entry>
- <entry>11</entry>
- </row>
- <row>
- <entry>REN</entry>
- <entry>Remote enable. Asserted by the system controller, it enables
- devices to enter remote mode. When REN is asserted, a device will
- enter remote mode when it is addressed by the controller. When
- REN is false, all devices will immediately return to local mode.
- </entry>
- <entry>17</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>
- </section>
- </section>
- &license
- </article>
|