Problems with data acquisition

Signal acquisition, processing and output
Ответить
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Problems with data acquisition

Сообщение Pablo! »

Hello, I'm a newbie with Labview, I hope my questions aren't too stupid, but I'm having a lot of problems and I'm going crazy. :crazy:
I have to acquire different current signals 4-20mA that corresponds to 3 different variables (pressure, temperature and flow).
I want to create a task that acquire the current and convert each channel measure in one of these 3 groups.
Well, I've created a custom scale in MAX (I'm using Labview 8.6), and then I've used the daq assistant to configure a couple of channels for testing.
The problems are: I've created a vi for the current acquisition with the DAQ assistant, it works but if I generate code the new vi doesn't works.
Anyway I've tried with the voltage acquisition and in this case the code works properly. I don't know why but this is not important cause for the acquisitions I'm using the pxi-6229 and it works with voltage.
Now There is another problem: if I use the custom scale created in MAX the VI doesn't works properly: the maximum temperature displayed is 21°C but the equation is: Temp= 114.155*V-100 and the maximum voltage displayed until now is 1.5 V that correspond at 71°C.
How shoul I fix it?
Thanx for the answers
Andband
assistant
assistant
Сообщения: 132
Зарегистрирован: 26 окт 2009, 23:05
Версия LabVIEW: 7.1
Контактная информация:

Re: Problems with data acquisition

Сообщение Andband »

http://sine.ni.com/nips/cds/view/p/lang/en/nid/14137
Like most NI meassurement cards also this one only meassures voltage and is not capable for measuring current. This could explain why your code works with voltage and not with current.

I have no clue how the current acquisition could have worked with the DAQ assistant then. I think you observerd something wrong. Current acquisistion shouldn't work at all.

I would try to convert the current in a voltage with using e.g. a 100 Ohm resistor.
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Re: Problems with data acquisition

Сообщение Pablo! »

Andband писал(а):http://sine.ni.com/nips/cds/view/p/lang/en/nid/14137
Like most NI meassurement cards also this one only meassures voltage and is not capable for measuring current. This could explain why your code works with voltage and not with current.

I have no clue how the current acquisition could have worked with the DAQ assistant then. I think you observerd something wrong. Current acquisistion shouldn't work at all.

I would try to convert the current in a voltage with using e.g. a 100 Ohm resistor.
I know, but if I use the daq assistant it works also with the current, the broblems starts when I generate the code.
Anyway now I'm working with the voltage, but the code cannot works if I use the scale.
This is very strange.
Andband
assistant
assistant
Сообщения: 132
Зарегистрирован: 26 окт 2009, 23:05
Версия LabVIEW: 7.1
Контактная информация:

Re: Problems with data acquisition

Сообщение Andband »

If your temperature instrument has current as am output you CANNOT hook it up to a voltage input of your meassurement card. That won't give the right results.

Or have you been able to change the output to voltage?
If yes just use a normale voltage read example out of the Labview Examples and modify that or for starting, see if it reads a voltage that makes sense (I would try to avoid the DAQ assistant).
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Re: Problems with data acquisition

Сообщение Pablo! »

Andbad: if I use the daq-assistant I can read voltage and current. The pxi-6229 acquire only voltage but it's possible acquiring currents having a shuffle resistance, the acquisition will be in tension, but the task will converts the value in current.
I'm not supposing, I have done this and the values are corrects.
The problem is another, if I try to change the scale of the value (for example converting the voltage value in a temperature value with a linear scaling) the graph works until the temperature is under 21 °C, over this value not.
But if I don't use the scale the correct value of current (or voltage) is displayed.
Аватара пользователя
Eugen Graf

Activity Professionalism Silver Black
guru
guru
Сообщения: 6502
Зарегистрирован: 13 ноя 2007, 02:20
Награды: 4
Версия LabVIEW: 2009
Откуда: Saarbrücken
Контактная информация:

Re: Problems with data acquisition

Сообщение Eugen Graf »

Hi!

Why do you use DAQ Assistant? You may use DAQmx :vi:s, and scale the voltage programmaticaly.
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Re: Problems with data acquisition

Сообщение Pablo! »

Hi eg, I used daq assistant to generate code. As I've written in my first post I'm a newbie and I have a lot of doubt about daq-mx.
Anyway I'll try to use directly the daq-mx, maybe I'll have success.
Andband
assistant
assistant
Сообщения: 132
Зарегистрирован: 26 окт 2009, 23:05
Версия LabVIEW: 7.1
Контактная информация:

Re: Problems with data acquisition

Сообщение Andband »

I would try to convert the current in a voltage with using e.g. a 100 Ohm resistor.
What is a shuffle resistance? A physical resistor that is only there when using the DAQ Assistant? :D
However, everyhing what the DAQ Assistant can do, you can rebuild with your own hands, too.
So create a task for aquiring your current/voltage that works this time (e.g. with having a look at the SubVI that your DAQ Assistant has created before or with having a look at the Labview-Examples).
You've said, that the readout of the values is true, I assume you checked that in wiring up the simple voltage without any scaling to a chart? If not I suggest you do this first.
And then, listen to eg :) :
Do the scaling yourself with labview's numerical functions and wire it up to another chart and you are good to go.
Andband
assistant
assistant
Сообщения: 132
Зарегистрирован: 26 окт 2009, 23:05
Версия LabVIEW: 7.1
Контактная информация:

Re: Problems with data acquisition

Сообщение Andband »

why don't you just check out the Labview DAQmx examples ? They come with Labview, you don't have to download anything. There you can see exactly, how simple data acquisition with DAQmx has to be done.

And as mentioned: You can also look in the subvi, the DAQ assistant created: There you will find DAQmx code again.

Try that, and if doesn't work, maybe you could post a screenshot :)
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Re: Problems with data acquisition

Сообщение Pablo! »

Andband писал(а):
I would try to convert the current in a voltage with using e.g. a 100 Ohm resistor.
What is a shuffle resistance? A physical resistor that is only there when using the DAQ Assistant? :D
Maybe we are writing the same thing, but my English isn't so good and probably I'm not able to explain properly. :B
Anyway, I've created a code without daq assistant. If I cancel the "scale" palette it works and the chart shows the correct values of the currents.
I used the probe and i've noticed that the values didn't arrive at the chart.
Вложения
Temp to Current.vi
(19.08 КБ) 326 скачиваний
Andband
assistant
assistant
Сообщения: 132
Зарегистрирован: 26 окт 2009, 23:05
Версия LabVIEW: 7.1
Контактная информация:

Re: Problems with data acquisition

Сообщение Andband »

Pablo,
how is it possible, that the chart shows the correct values and at the same time no values arrive at the chart? Or do you mean when using DAQ assistant those values don't arive? I guess the latter.

Unfortunately I have only Labview 7.1. I would need a screenshot to see that thing :).

But on the other hand, when the correct data already does arrive at the chart, then just disengage the wire that goes into that working chart and use it as an input for your numeric operations (those need to calculate your temperature) - then add the output of that calculation again to tyour chart
Pablo!
beginner
beginner
Сообщения: 11
Зарегистрирован: 01 фев 2010, 10:30
Версия LabVIEW: 8.6
Контактная информация:

Re: Problems with data acquisition

Сообщение Pablo! »

Andband писал(а):Pablo,
how is it possible, that the chart shows the correct values and at the same time no values arrive at the chart? Or do you mean when using DAQ assistant those values don't arive? I guess the latter.
No, I mean if I use the vi without the "scale" palette it works, if I put in in the vi it doesn't works (I know, sometimes I forget some subject in my phrases).
Bot now I followed your advice: I did all with the basics palettes, now it works. Ok, I wasted a lot of time trying to fix problems instead of surrounding it.
Anything does experience, tnx all for the support. :wink:
Ответить

Вернуться в «Signal processing»