I have some troubles to configure the AUXPORT on USB1208HS-2AO. If I configure some bits in DIGITALOUT and some others in DIGITALIN, I have error n°42 when I do cbDOut on the board (which means "Digital port not configured correctly for requested operation"). If I configure the entire port in DIGITALOUT, it is working properly. What is the problem ? Overmore, when I try to have the number of bits on AUXPORT (with cbGetConfig(DIGITALINFO, BoardNum, AUXPORT, NbBits)), it returns error n°105 which means "Invalid configuration item specified." Thanks for your help.
- Job Title: Developer
- Industry:
- Application:
73 months ago
BenWhite
Answers
Once you call DConfigBit to configure the direction of a single bit (or said a better way, once you mix the direction of bits in the digital port), then you can no longer call the port-wise functions (DOut or Din). Instead, call DBitOut or DBitIn, which are the bit-wise functions.As for cbGetCofig, the following works properly (returns the value 16, which is the number of DIO bits on the USB-1208HS series devices):
InfoType = DIGITALINFO = 3
DevNum = 0
ConfigItem = DINUMBITS = 6
73 months ago
Measurement Computing
Was this answer helpful?
Yes (4) /
No
(0)