Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sensor Measurment

Iam using an NI Elvis II board, I have a photoresistor in voltage divider configuration, and Iam trying to get voltage signal using a A0 of my DAQ device in the Elvis board. The problem Iam having is -connecting my voltage divider to a 5V constant power supply.  Here are the steps I followed:

 

1. I turned on the elvis board, and turned on the prototype board as well. I see that there are lights for +/- 5V and +/-15 volts . so I connected my voltage divider circuit to the point in the vertical rail that corresponds to constant 5V DC. Now here is the problem Iam having..

 

I see that there is voltage comming out of the 5V power supply when I connected my external multimeters lead to the  5V supply...what could be wrong

0 Kudos
Message 1 of 23
(7,502 Views)

SK0480:

So to clarify, what value do you expect to see across the multimeter? From your problem statement, it
sounds like you are reading the correct value of 5V across the constant 5V power supply, so I'm not sure why you're
expect it to be different. I'm having a hard time understanding what the problem is, so feel free to explain it
some more.

Specifically, when you say there is voltage coming out of the power supply, do you mean there is less than 5V? If
so, what value are you reading?

Let me know if you have any questions.


Tori W.

National Instruments
0 Kudos
Message 2 of 23
(7,487 Views)

Just make this clear.

 

I have a light sensor connected in a voltage divider configuration on a breadboard.

 the votage thats comming out of it is connected to the A0 of the analog input channel of the daq board. In the labview.

 I have VI to control the stepper motor that take the input as the number of steps and the direction from the USER.

 

but I want to modify this program.... and here is what I want to do is this

 

Voltage that comming from the divider circuit would determine the number of steps the motor needs to rotate. Here is logic I want to have..

 

IF ( the out voltage is greater than the threshold voltage, then this is how many steps the motor should rotate clockwise)

IF ( the out voltage is less than the threshold voltage, the motor should should rotate counter clockwise)

 

Attached is the program I Have

 

0 Kudos
Message 3 of 23
(7,481 Views)

SK0480:

This forum is meant to answer specific questions about LabVIEW, its VIs and any problems that may occur with
them. Feel free to ask any specific question, but general queries about how to design your code are out of
the scope of the discussion forum area. Do you have a specific question about the functionality of LabVIEW
or your NI Elvis II?


Tori W.

National Instruments
0 Kudos
Message 4 of 23
(7,471 Views)
Ok thanks for letting me know that. The specific questions I have are....
How can I identify the DIO ports in the Elvis board
and Iam having trouble understanding Daq write VI. Lets say I want to send 4 boolean values to DIO port from labview what would be the procedure for that. Also how can I test those signals at dio ports
0 Kudos
Message 5 of 23
(7,453 Views)

SK0480:

The device pinouts which identify lines for the ELVIS II can be found here: http://digital.ni.com/public.nsf/allkb/CA38EB25DD9BD829862574B30071332D For your DAQmx write, you would need to configure it for Digital,single or multiple channel, single sample, 1D Boolean. This will allow you to send an array of boolean values to your DIO line.You can test your DIO lines using Test Panels in Measurement & Automation Explorer. Please see this link for a tutorial on performing Test Panels. http://zone.ni.com/devzone/cda/tut/p/id/4638 Let me know if you have any more questions.


Tori W.

National Instruments
0 Kudos
Message 6 of 23
(7,446 Views)

ok well, the pinout diagram of the elvis shows the pin descriptions but does not say anything on digital I/O ports..

 

Port is a group of DIO lines....and if Iam using a Daq WRITE VI then lets I want to send the boolean array to the DIO port rather than single dio line or multiple dio line. it is usually numbers like #0 or Number 1, so how can I find that out..

 

0 Kudos
Message 7 of 23
(7,435 Views)

SK0480:

If you look in the user manual on page 2-16 (http://www.ni.com/pdf/manuals/374629b.pdf), you can read that they are all on port 0. You can read/write to a port by choosing this in your DAQ Create channel, but you will need to decide whether you want one channel per line or one channel for all lines which can be set in your Line Grouping terminal. You will need to verify this, but it sounds like you want to use one channel for all lines.


Tori W.

National Instruments
0 Kudos
Message 8 of 23
(7,427 Views)

HI here is another problem Iam having---I want to write a boolean array to the output port.....

 

Attached is VI that iam using to write the boolean array to the digital I/O lines

 

I found this example digital Write vi on the NI website...this VI accepts input in hexadecimal and sends it to the port..

 

Iam trying to modify this VI so that it accepts boolean array and write to 4 digital lines and it keeps giving error.

 

I have attached a VI.  In the block diagram, there is create channel VI....ok I want to send this boolean array of size 4 to 4 digital I/O lines...but it only accepts either a PORT or a single digital line...what can I do to pass multiple digital lines which in my case is 4.

 

just to clarify futher....

 

I have a boolean array of  size 4 and I want use single DIO line for each element in the array....in this case Digital output 0,1,2,3 since there are 4 elements in the array. The port input has 24 lines and the data that I want to send needs only 4 lines...and therefore gives an error because the number of lines on the port does not match with the lines of data..

 

 

0 Kudos
Message 9 of 23
(7,421 Views)

ok never mind.... I found  this example VI for 1d boolean array....which I plan to use it as a subvi in my program......

 

now here is the problem Iam having----I have a  1d boolean array of size 4 and I want to use one channel for each line not one channel for all lines..

 

In the instructions of this VI it says that if using one channel for each line then use a different polymorfic version of the DAQmx write...what does this mean....can you please clarfiy on that..

 

It also states that " The array control is sized for 8 lines, if using a different  amount of lines, change the number of elements in the array to equal the  number of lines cosen."..............How do I change that.

 

Thanks

Shaham K

0 Kudos
Message 10 of 23
(7,415 Views)