ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

Re: Repeated data.

已解决!
转到解答

Ok. Now I'll explain. The first VI that i built is what you see in the attachment called VI-1. Everything worked fine here except the fact that after about 50 minutes the program gave me error 200279. All the settings that i had entered (channel number, graphics, numerical indicators) were fine. Trying to solve the error 200279, i reconverted the VI as advised on this thread, but being new in labview i'm having problems now in reordering all the sensors with which i have to work (i mean graphs and numerical indicators). You can see this new attached VI (called VI-2). I think i did everything as you suggested, what am i doing wrong? For now i have inserted only one pressure sensor, i believe that understood the operation of only one then add other sensors will be simple. Can someone definitively correct the VI-2 please?

下载全部
0 项奖励
31 条消息(共 41 条)
1,694 次查看

There are several things seriously wrong with your code.  I needed to make several "fixes" to get it to do anything "sensible".

 

Let me begin by saying that I don't have a cDAQ to use as a test device, so I substituted a USB-6002 and used AI0 as my (single) input channel.  I also diagram-disabled the DAQmx Configure Logging.

 

I notice that you are taking 1 Sample (at a time) at 1 Hz, yet you are collecting the (single point) data in a Waveform, which expects an array of data.  I changed the DAQmx Read to "Single Channel, Single Sample, Dbl", diagram-disabled the selection of the second element of the (now-not-present) 1-D Array of Waveforms, and wired the Dbl output wire directly to the multiplication-by-160 function.  [Incidentally, why are you doing this?  DAQmx is designed to report "real values" -- you shouldn't need to scale yourself.  And why add an offset of 0?].

 

I was a little surprised when I ran this program -- the Display updated its time, but showed me no values.  So I "unlocked" the static Y Scale you built into the code, and there were nice data, scrolling across the plot at 1 Hz.

 

See if this description of "How I Fixed Your Code" makes sense to you, and see if you can make the same changes.

 

Bob Schor

0 项奖励
32 条消息(共 41 条)
1,677 次查看

Hello. Thank you for your reply. Reading what you wrote, i understood that you watched VI-2. This is what i did   after the type of solution was suggested to me, but it is not very clear to me. I would prefer to continue to use the VI-1 ... but trying to solve the error 200279 (trying to give a name to each column of the excel file in output). I also downloaded the ADD-IN suggested by the NI website to convert a TDMS file to Excel, but the conversion is very long! To answer your question, if you look at the VI-1, i have to convert a voltage data to a given pressure; this conversion must be linear,so i introduced a scale factor (depends on the sensor i use) and also a value 0 (see it as the value that i can change, at any time, given by 'intercept of a straight line).

0 项奖励
33 条消息(共 41 条)
1,663 次查看

1.png

You really need to start reading the help file

Names , scales, all that happy stuff are handled inside DAQmx


"Should be" isn't "Is" -Jay
34 条消息(共 41 条)
1,648 次查看

Hi guys! I had to add the commands (blocks) "Get Date / Time in seconds" and "Get Date / Time string" to get the correct time and date in the excel data output sheet. I do not understand why it does not work. Did i make a mistake in configuring the "Set dynamic data attributes" block or did I block the blocks badly?

Thanks

0 项奖励
35 条消息(共 41 条)
1,627 次查看

Sorry. I forgot to attach the vi and the image of the error!


@Iskandark wrote:

Hi guys! I had to add the commands (blocks) "Get Date / Time in seconds" and "Get Date / Time string" to get the correct time and date in the excel data output sheet. I do not understand why it does not work. Did i make a mistake in configuring the "Set dynamic data attributes" block or did I block the blocks badly?

Thanks


 

0 项奖励
36 条消息(共 41 条)
1,622 次查看

You are setting Start timestamp only you need to add timestamp and wire to that


"Should be" isn't "Is" -Jay
0 项奖励
37 条消息(共 41 条)
1,609 次查看

Hello! Thanks for the reply. Could you give me a screenshot of what you mean? Before asking, i read the help of each block, but i don't understand what i need to connect (specifically, i don't understand how to configure "Set Dynamic Data" block and how to connect it to "Get Date / time in second" block. I also believe that the "Get date / time string" is useless. Quite right?) I put the attached VI!

0 项奖励
38 条消息(共 41 条)
1,599 次查看
解答
已被主题作者 Iskandark 接受

Capture.PNGCapture1.PNG


"Should be" isn't "Is" -Jay
39 条消息(共 41 条)
1,591 次查看

Thank you very much! 🙂 Tomorrow morning  i will try this solution!!!


@JÞB  ha scritto:

Capture.PNGCapture1.PNG


 

0 项奖励
40 条消息(共 41 条)
1,582 次查看