Can I use the result of addchannel and addline to read and write to specific channels?
조회 수: 3 (최근 30일)
이전 댓글 표시
For example:
AnalogIn = analoginput('mcc');
ChIn = addchannel(AnalogIn,1,'ChSignal');
DigitalOut = digitalio('mcc',0);
ChOut = addline(DigitalOut, 0, 'ChOut');
It would be great if I could read from ChIn and write to ChOut but everything I have read indicates that I have to use AnalogIn and Digital out directly like:
putvalue(DigitalOut,[1 0]);
data = getdata(AnalogIn);
I feel like there MUST be some way to do this with the dioline/aichannel objects (like ChIn and ChOut in my example) but I can't figure it out. I don't like using DigitalOut and Analog in because they obscure which pins I am referencing on my DAQ. Can I use the dioline/aichannel objects to read and write in a way that makes my code easier to read? If so, how?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!