Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cannot access properties on `DO/DIChannel` with multiple lines an `LineGrouping.CHAN_FOR_ALL_LINES`

Aperta
#514 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Inizia riproducendo l'esempio fornito di add_do_chan multilinea con LineGrouping.CHAN_FOR_ALL_LINES, quindi traccia il modo in cui channel.name viene risolto per CHAN_FOR_ALL_LINES. Il lavoro è completato quando channel.do_num_lines restituisce 4 sia sui dispositivi PCIe-6612 emulati sia su quelli reali, senza modificare manualmente channel._name.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Properties on DI/DOChannels with multiple lines and Grouping.CHAN_FOR_ALL_LINES cannot be accessed, because channel.name contains the wrong name.

On an (emulated and real) PCIe-6612 the following code snippet

with nidaqmx.Task() as task:
    channel = task.do_channel.add_do_chan(
        lines="Dev1/PFI25,Dev1/PFI26,Dev1/PFI29,Dev1/PFI30",
        line_grouping=LineGrouping.CHAN_FOR_ALL_LINES,
        name_to_assign_to_lines="Input",
    )
    print(channel.do_num_lines)

results in

nidaqmx.errors.DaqError: Property cannot be set seperately for each line.
When setting this property, specify a virtual channel as the active channel.
Property: DAQmx_DO_NumLines
Channel Name: Input
Physical Channel Name: Dev1/PFI25

Task Name: _unnamedTask<0>

Status Code: -200641

Unassigning channel._name (so that channel.name is resolved to channel._all_channels_name) or directly setting it to "Input" fixes this issues and the proper value (4) is returned.

Lingua principale
Python
Stelle
590
Fork
199
Merge medio
1g 20h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ni/nidaqmx-python

Tutte le issue di ni/nidaqmx-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.