SRF Posted August 10, 2022 Share Posted August 10, 2022 Having a strange time programming some of the outputs on the USB-1024LS. Using Visual Studio C# The following will work for PortA: boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortA, MccDaq.DigitalPortDirection.DigitalOut); boardRly.DBitOut(MccDaq.DigitalPortType.FirstPortA, 0, MccDaq.DigitalLogicState.High); However, the following will NOT work for port B boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortB, MccDaq.DigitalPortDirection.DigitalOut); boardRly.DBitOut(MccDaq.DigitalPortType.FirstPortB, 0, MccDaq.DigitalLogicState.High); Am I missing something? All programming examples are so old they no longer open in Visual Studio. Thanks for any help. Link to comment Share on other sites More sharing options...
0 DAQman Posted August 10, 2022 Share Posted August 10, 2022 Hello, The UL Help file is a good source of information, especially if you search and find the device's reference page. It can be found on your start programs menu under Measurement Computing. Under the DBitIn and DBitOut section, it tells you to always use port type FirstPortA with bit numbers 0 to 23. For example: boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortA, MccDaq.DigitalPortDirection.DigitalOut); boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortB, MccDaq.DigitalPortDirection.DigitalOut); //set D0 on FirstPortB high boardRly.DBitOut(MccDaq.DigitalPortType.FirstPortA, 8, MccDaq.DigitalLogicState.High); Best regards, John Link to comment Share on other sites More sharing options...
0 SRF Posted August 11, 2022 Author Share Posted August 11, 2022 Thanks for your quick reply. I was able to finally find this information by opening the individual programming files (again, solution will not open in today's programing environments). I was very confused by the answer since your own provided application DAQami lists the ports as FirstPortB0, FirstPortB1, etc... on the screen. Thank you for the clarification! Link to comment Share on other sites More sharing options...
Question
SRF
Having a strange time programming some of the outputs on the USB-1024LS.
Using Visual Studio C#
The following will work for PortA:
boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortA, MccDaq.DigitalPortDirection.DigitalOut);
boardRly.DBitOut(MccDaq.DigitalPortType.FirstPortA, 0, MccDaq.DigitalLogicState.High);
However, the following will NOT work for port B
boardRly.DConfigPort(MccDaq.DigitalPortType.FirstPortB, MccDaq.DigitalPortDirection.DigitalOut);
boardRly.DBitOut(MccDaq.DigitalPortType.FirstPortB, 0, MccDaq.DigitalLogicState.High);
Am I missing something? All programming examples are so old they no longer open in Visual Studio.
Thanks for any help.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now