Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

(Real Time-labview) Analog Voltage measurement

Hi David,

 

Thanks for your response.

 

I am not trying to call (get terminal name with device prefixVI). How do i call this, so, i can put ai/start trigger? I get this VI but how to put in the my program VI? 

 

Thanks for your time

VT

 

0 Kudos
Message 11 of 28
(1,490 Views)

Hi David,

 

I got the get terminal VI immediately. So, don't worry about that. My next problem is when i deploy the VI on target , It shows 0 writing sample( as indicator node of write VI), means It is not generating the code. It show the error -89120 in start VI in AO channel, i.e " source terminal to be routed could not be found on the device. Make sure terminal is valid for specfic device. Go to MAx for valid terminal names. Property start:DigEdgeSrc, start EdgeEdge" I put the terminal ai0/start trigger in get terminal VI. I think that i need to configure it in MAX, then it will identify the terminal. Please, let me know How I configure the get terminal VI with its correct terminal name in MAX? I put ai0 for reading and ao0 for generation(suppose). Reading is fine. but writing is not working. I'll appreciate your kind help.

 

Thanks again.

VT

 

0 Kudos
Message 12 of 28
(1,483 Views)

My next question is whether there is any alternative way to read and generate the codes as per microsecond order(fastest rate). I mean by using  software timing VIs- wait VIs, and Tick.

 

Thanks for your time

 

VT

0 Kudos
Message 13 of 28
(1,481 Views)

Hi,

 

In my next to previous,post  you get Start edge  and a icon.  (That is written wrong by mistake). 

It should be [property Start :Dig Edge Src and Dig Edge Edge.]- corrected

Thanks

0 Kudos
Message 14 of 28
(1,479 Views)

Are you trying to do this with two devices (read on one device and write on the other) or just one device? Also if you could take a screenshot of your block diagram or attach the VI you are trying to deploy and run to see why you are getting that error, that would be great.

 

I was able to run this example on my end, so I am curious as to what is different between our VI.

 

David A.

National Instruments
Applications Engineer
0 Kudos
Message 15 of 28
(1,472 Views)

I want to do with the same device PXI 6356 slot2/ai0 and ao0 terminals. I am attaching the vi with this post. I tried to configure get terminal vi with the help of max. I might be wrong, but when i run the program, it shows -89120 error.

 

Thanks a lot

VT

0 Kudos
Message 16 of 28
(1,469 Views)

Hey,

 

I have made some changes to your program that should allow you to run without that error. Let me know how it goes. I have attached the VI.

 

David A.

National Instruments
Applications Engineer
0 Kudos
Message 17 of 28
(1,461 Views)

Hi David,

 

Thanks for your kind support and help.

 

Now, modified VI does not show any error, It shows written samples(amount).but i am lill bit confused about it, because i can't see any waveform(generated) on oscilloscope. When i hit run, it automatically stops very shortly( a wfm<read> appears for a while on front panel), without hitting stop. I am not sure but I think its due to Boolean coding with stop button. Is this true? I find two modifications in the VI-one is the location of start VI is changed, other is merged error vi is put after start vi. I want to ask  why place of start vi is changed in reading and writing? further can we use auto start in writing VI instead of start VI ? Can you tell me please, where exactly, i was wrong?

 

My next question is that I want to get each written value and its corresponding time value although input and output are in analog. I mean that i want to record each written code and absolute time taken by the loop for each iteration.

How can i do that? Can it be done by changing the task properties( 1 sample on demand) in MAX and using flat sequence and RT(wait until next multiple) or there is any other way for that? I 'll appreciate your precious suggestions.

 

Thanks

VT

0 Kudos
Message 18 of 28
(1,456 Views)

It could definitely be stopping because of the boolean state. That is something that you will want to make sure that it is not stopping when it is trying to run. The reason I had to move the start tasks and the merge errors is that when you are trying to do an analog input and analog output on the same device they will need to use the same clock source.To ensure that we this happens that is why we start the AI Task first and then the AO Task.

 

As far as the timing for a loop what you can do is use the Get Date and Time in Seconds VI. Use this VI once before the while loop and wire it to a shift register. Add another Get Date and Time Seconds VI inside the while loop. Add a subtract VI inside the while loop and for the X input terminal wire the Get Dat and Time Seconds VI that is inside the while loop. Wire from the shift register to the Y Input of the Subtract VI. Also, branch off of the output of the Get Date and Time VI that is inside the while loop and wire that to the corresponding shift register. I have attached a block diagram image.

 

David A.

 

 

National Instruments
Applications Engineer
0 Kudos
Message 19 of 28
(1,444 Views)

Thanks David!! for your kind help and invaluable informations.

 

I got time(sec) as 0.16xxx 0.18xxx means around that. I run this prgram without the boolean and unbundle function(attached with stop button), it runs in the same way as with those functions. When i put indicator to iteration box, it shows the value 0, means it iterated only once. Second point is that i want this time(elapsed) of microsec order and want to get it again and agin as while loop iterates. Means each time for each sample (written) as we get in the analog or discrete form means we want to log data and its corresponding time. means time scale should me of microsec order.

I am attaching another VI(R/W port from same device). Please let me know whether it works at microsec order? How can we perform data recording (time and o/p both)in that VI and in previous VI too?

 

Thanks again for your precious time

 

VT

0 Kudos
Message 20 of 28
(1,440 Views)