config measurement computing digital I/O


Recommended Posts

I have a Das08 board with 24 digital I/O, with a exp32 connected. I have successfully read the analog signals, but am having trouble reading the digital inputs. I set up a command channel named "setport" and specified the port# as 0, port letter A, and type as input. In the command/alert window I typed "setport=0". the resulting error message said "invalid digital port number". I changed the port# to 1, and got no error. But the port doesn't respond to a change in input.

This might be related or not: I have a thermocouple attached to the exp32. When I set up a channel to read it, I get "Channel Error Timing=1.00, offset=0.00: Unable to find board name match, using default on Board#0". But it stops flashing alert after a couple seconds and reads the thermocouple fine.

Thanks for any help.

Brian

Link to comment
Share on other sites

The "unable to find board name" error just means DAQFactory couldn't find the board in its list and so doesn't know the exact capabilities. It then uses the default one. The first error may be because of this. It may be that the default board doesn't support input on port 0.

Link to comment
Share on other sites

Thank you for the reply. That makes sense. I will check if I can access port1 (the second port on this board) or not. But to access the first port (port0), I was going to try to set up the board with a sequence, using universal library commands. Any guidelines about syntax and how to call those functions in a sequence?

Thanks,

Brian

Link to comment
Share on other sites

I'm assuming you mean using extern() to load the Universal Library DLL separately? If so, it should work since you aren't streaming, however, I don't have the docs on that library handy. If you can post the C prototype either from the docs or their header file, I can help with the prototype for extern().

Link to comment
Share on other sites

I have attached the help pages for configuring the port and for reading a digital input. I am hoping that if I configure a port (for input or output) that I will be able to read and write individual I/O (bits) through Daqfactory channels, and not have to read/write through sequences. Thanks again for your help.

Briandig_port.pdf

Link to comment
Share on other sites

This post is for others' benefit; I think I have this solved without using a sequence. I have successfully operated my digital ports using just channels. First, you need to set the port direction. I set a channel called "portset", with the D#=the board# in instacal. Set type to "command", in the command/note section I click the "...". Set the command to "Dconfig", set the port number to 1, set the port letter to whichever port you want to configure (for example "A"), and set the type (input or output). this is a little confusing: Port 1 refers to the whole I/O port, which consists of A, B, CH, and CL ports. So the port number is always 1. The port letter is as described in the manual for your board. Accept the changes. go to the command/alert tab and click on the bar to enter a command. type "portset=0" and enter. This executes the command in the portset channel. Now you can configure a channel on that port. I entered "do1" for my first channel. I wanted to address the second bit in the "B" part of the digital I/O port. It appears that for some reason, the individual digital i/o bits numbering starts with "8". So to address that bit, I used channel 18. I then went to the command/alert tab again and entered "do1=1", and the valve opened! Hopefully, this post is enough to help anyone else that is trying to use a measurement computing DIO board. By the way, this worked for the digital port on a Das08 board too, not just a DIO board.

Brian

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.