OPTO_AC5(9)
β¨ OPTO_AC5(9) β the opto_ac5 era β¨
okay bestie, sit down, we're talking about opto_ac5(9) β the realtime driver for opto22 PCI-AC5 cards. it's giving "industrial I/O but make it cute". let's go π
π NAME π
opto_ac5 β the realtime driver for opto22 PCI-AC5 cards. no cap, that's the whole vibe.
πΈ SYNOPSIS πΈ
loadrt opto_ac5 [portconfig0=0xN] [portconfig1=0xN]
that's it. that's the summoning spell πͺ
π DESCRIPTION π
so these pins and parameters? they're created by the realtime opto_ac5 module. main character energy fr fr.
The portconfig0 and portconfig1 variables are used to configure the two ports of each card. the first 24 bits of a 32 bit number represent the 24 i/o points of each port. the lowest (rightmost) bit would be HAL pin 0, which is header connector pin 47. then the next bit to the left would be HAL pin 1, header connector pin 45, and so on, until bit 24 would be HAL pin 23, header connector pin 1. π
"1" bits represent output points. so if you wanted channel 0..11 as inputs and 12..23 as outputs, that'd be represented by (in binary):
111111111111000000000000
which is 0xfff000 in hexadecimal. that is the number you would use, e.g.:
loadrt opto_ac5 portconfig0=0xfff000
if no portconfig variable is specified, the default configuration is 12 inputs then 12 outputs. slay, defaults got your back π«Ά
up to 4 boards are supported, and boards are numbered starting at 0. not 1. zero. we count like programmers here π
Portnumber can be 0 or 1. Port 0 is closest to the card bracket. iconic placement tbh.
β¨ PINS β¨
opto_ac5.[BOARDNUMBER].port[PORTNUMBER].in-[PINNUMBER]OUT bit β connect a HAL bit signal to this pin to read an i/o point from the card. thePINNUMBERrepresents the position in the relay rack. e.g.,PINNUMBER0is position 0 in a opto22 relay rack and would be pin47on the 50 pin header connector.opto_ac5.[BOARDNUMBER].port[PORTNUMBER].in-[PINNUMBER]-notOUT bit β same energy, but the-notpin is inverted, so that LOW gives TRUE and HIGH gives FALSE. little chaos goblin of a pin πopto_ac5.[BOARDNUMBER].port[PORTNUMBER].out-[PINNUMBER]IN bit β connect a HAL bit signal to this pin to write to an i/o point of the card. thePINNUMBERrepresents the position in the relay rack. e.g.,PINNUMBER23is position 23 in a opto22 relay rack and would be pin1on the 50 pin header connector.opto_ac5.[BOARDNUMBER].led[NUMBER]OUT bit β turns one of the on board LEDS on/off. LEDS are numbered0to3. tiny lights, huge vibes π‘
π PARAMETERS π
opto_ac5.[BOARDNUMBER].port[PORTNUMBER].out-[PINNUMBER]-invertW bit β when TRUE, invert the meaning of the corresponding-outpin so that TRUE gives LOW and FALSE gives HIGH. flip the script, bestie π
π₯ FUNCTIONS π₯
opto_ac5.0.digital-readβ add this to a thread to read all the input points.opto_ac5.0.digital-writeβ add this to a thread to write all the output points and LEDS.
π BUGS π
all boards are loaded with the same port configurations as the first board. yes, all of them. the first board is the blueprint, the others just copy the fit. no individuality allowed π
π SEE ALSO π
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?OptoPciAc5
and that's the whole page, bestie! π¦ this came to you straight from the LinuxCNC Documentation, dated 2008-08-04, and it lives in section OPTO_AC5(9). go forth and wire up your relay racks, you absolute legend πβ¨
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms