Quantcast
Channel: All LabVIEW posts
Viewing all 191391 articles
Browse latest View live

Re: EXE Build Error _ BeginUpdateResourceA.vi

$
0
0

Let me add that I've seen this error before and am getting it again this morning.  It worked fine until my last (minor) code updates.  On a whim, I just built another executable in the same project (which worked fine) and, when trying again with the first build spec, got "Error 1 occurred at EndUpdateResourceA.vi"

 

This thread discusses a few modifications to Begin...vi.  Mr._Jim suggested:

  1. Mass compiling the entire application directory
  2. Closing LabVIEW and reopening it

I'd love to hear a solution to this.  Maybe it'll go away when I upgrade to LV2014?  Maybe I'll just blame my lousy computer and go home...


Re: Exe LabVIEW Version

Re: indicate how many times there is a higher or lower value than indicated

$
0
0

I really appreciate that you take a time to solve my trouble

and I'd like to know if there are any problem to choose" use default if unwired" because when I run my original code, this works good (apart of the explanation in point 2)
I probed with the function max & min ,too with the same structure and I choose "use default if unwired" and I attached the other vi because I think the solution to my question can be useful to both and yeah the function max&min is less code


 

now I try to detect a peak could you check my code. I have problem to represent the peak on the graph

Re: indicate how many times there is a higher or lower value than indicated

$
0
0

and if other take the time to help with this. Your responses will be well received ,too :smileyhappy:

Re: High-speed data acquisition - Low frame rate

$
0
0

Hi Bill and Lynn,

 

Thank you very much for the response. However, I am a bit confused about some of the concerns you raised. I admit that my code is not memory- and execution-efficient - possibly because I learned LabVIEW coding merely by looking at example codes. Following is my response to your comments.  I would appreciate it if you could help me one more time. 

 

"Sequence structures defeat LabVIEW's inherent parallelism. Stacked sequence structures obscure code and force right to left wiring for sequence locals. They are almost never required in good LV code, and when they are necessary it is almost always a single frame to enforce dataflow."

I needed sequence structures for initializing the digitizer. Also, some of the sequence structures were provided in the SDK of the digitizer card. What alternative do I use to Sequence Structures?

 

"Local and global variables should almost never be used to pass changing data among parts of the program. They also often make extra copies of the data. Use wires, queues, or user events."

 I thought local variables make the code tidy. However, it makes sense not to use them if the program makes extra copies of data. 

 

"Value property nodes are the slowest way to move data, run in the UI thread (= slows things even more), and are rarely the best way to get access to the data."

I remember reading somewhere on this forum, that Value Property node is more efficient way than Local variables. 

 

"Nested loops have their places but in your code are likely complicating things more than they simplify them."

What alternatives should I follow?

 

"Do not dequeue from a queue in more than one place."

I have two queues in the code, which get dequeued at two locations. The third dequeue segment is disabled. I meant to delete it earlier but never got around to doing that. Do structures under "Diagram Disable" get compiled when executing the code?

 

Solutions:

Look at the Producer/Consumer Design Patterns. They show the best practices methods for operating loops in parallel.

I tried to follow the P/C design. The second block in the design (which contains a lot of nested loops) is the producer where the data is being acquired and the third block all the way at the bottom is where the data is being dequeued and written to the disk. 

 

When optimizing for speed and memory usage consider these factors:

Do nothing else in the acquisition loops except the actual acquisition and enqueuing the data. All analysis and saving should be done in parallel loops with sufficient buffering (usually the queues) that the speed of those loops does not limit overall performance.

Do not do any formatting or calculations on the data in the acquisition loop.

I can revise the code to implement these suggestions.

 

Do not display images on the front panel. This likely makes an extra copy and is certainly slow.

Although there are multiple display panels, there is only one (or two) that work. All others are disabled.

 

Do not configure or change parameters on the image devices while in the acquisition state.

We never actively make any changes to the configurations of the imaging devices. However I realized that the code would actually permit that activity, which implies that some CPU resources may be polling for these parameters. I will change the code to avoid this.

 

I look forward to your response. Thank you very much for your help, in advance.

 

Re: path

$
0
0

Erardo wrote:

because I don´t want to use all the file in a folder, so I change the while loop for an for loop just like you recommended and use a file dialog for call the files, for that reason I use the control for the number of iterations 


So you simply process a random number of files? Seems pointless.

 

You should define the "pattern" for the list folder operation such that only the desired files match, then process all of them.

Re: NI PXIe-7962R io clock for timed single cycle timed loop

$
0
0

Thanks a lot. This seems to explain well the situation.

 

Ariel

Re: how does the "pid control input filter" know the frequency of the input data? What's the difference between "Butterworth Filter" and "PID Control Input Filter"

$
0
0

As it is said in PID Control Input Filter documentation:

Applies a fifth-order lowpass finite impulse response (FIR) filter to the input value. Filter cut-off frequency is designed to be 1/10 of the sample frequency of the input value.

 

You do not need to know actual sampling frequence when using digital filters (FIR, IIR) - they're designed for normalized frequency, i.e. 1 = sampling frequency, 0.5 = half of the sampling frequency, etc. This is just how filters math works.


Re: How to solve Error -1074396080 occurred at IMAQ array to color Image

$
0
0

Hi AnkitRamani,

 

Can you please post your solution? I have the same problem when using Kinesthesia and NI Vision. I tried multiple fixes and still get the same error when converting from Array 24U to IMAQ Image.

 

Thanks in advance.

Re: how to do this program?

$
0
0

I expect that you recognize the "less than or equal to" symbol, the one next to it is "Select".  They're both on the Comparison pallet.  The multiply is on the Numeric pallet.

 

How have the tutorials helped?

Waveform chart from ADC card with external trigger - X-axis timing problem

$
0
0

Hi

I am new to LabView and this may be a trivial question. I am trying to program the data acquisition from an ADC (CAEN VT1720).  I am using an external trigger for data acquisition and trying to see the waveform after analog to digital conversion. When I run the program, though I can see the Y axis data (in an array), I see no X axis data (timing data). The data array input to the waveform chart is a 2D array and the program shows no error. What may be reason for this?

Re: Waveform chart from ADC card with external trigger - X-axis timing problem

$
0
0
A chart or graph will only display actual time if you pass that information to it. If the daq function you use does not create timing timing data like the NI DAQmx functions with the waveform data type, then you have to pass it yourself. One way is to use the offset and multiplier properties and set the start time and dt. The dt is just the inverse of your sample rate. You would also need to set the x axis property to either relative or absolute time.

Re: how to do this program?

$
0
0

I figured out where the symbols are and such. 

 

Now i just need to figure out where to place the price per gallon.

 

Below is what ive got so far.  I placed the amount tendered to subtract from the final price to get he discount price.

 

Untitled.png

Re: path

$
0
0

Thanks for your answers and support. I used your care instructions and now I am comfortable with the result it is just what I needed.

 

Best regards.

Re: how to do this program?

$
0
0
Your arithmetic is not at all right. You should go back to the flow chart that you created (or should have) and rethink it. One problem is the way you use the discount.

Re: connecting labview with oracle database

$
0
0

Thank you for the reply.

Can we connect labview with oracle database without database connectiviyt toolkit ?

I am using oracle database 10g express edition.

Re: High-speed data acquisition - Low frame rate

$
0
0

abhi_vt wrote:

Hi Bill and Lynn,

 

Thank you very much for the response. However, I am a bit confused about some of the concerns you raised. I admit that my code is not memory- and execution-efficient - possibly because I learned LabVIEW coding merely by looking at example codes. Following is my response to your comments.  I would appreciate it if you could help me one more time. 

 

"Sequence structures defeat LabVIEW's inherent parallelism. Stacked sequence structures obscure code and force right to left wiring for sequence locals. They are almost never required in good LV code, and when they are necessary it is almost always a single frame to enforce dataflow."

I needed sequence structures for initializing the digitizer. Also, some of the sequence structures were provided in the SDK of the digitizer card. What alternative do I use to Sequence Structures?

Sequence structures have limited use.  They should only be used when no other method of enforcing dataflow are available.  Stacked sequence structures have NO use, IMHO.  They have all the disadvantages of sequence structures in general, plus they just obfuscate code because you have to figure out where things enter and exit and what frames they belong to.  A state machine design pattern works better because, even though the individual frames in the case structure are hidden - as in the stacked sequence structure - wires are entering and exiting in an easily understood way.

 

"Local and global variables should almost never be used to pass changing data among parts of the program. They also often make extra copies of the data. Use wires, queues, or user events."

 I thought local variables make the code tidy. However, it makes sense not to use them if the program makes extra copies of data. 

 Even though LabVIEW is a graphically-oriented programming language, never sacrifice dataflow for "neatness."  Besides memory issues, global and local variable do NOT follow dataflow principles and are therefore notoriosly difficult to harness correctly.

 

"Value property nodes are the slowest way to move data, run in the UI thread (= slows things even more), and are rarely the best way to get access to the data."

I remember reading somewhere on this forum, that Value Property node is more efficient way than Local variables. 

I read that somewhere, also.  It's wrong.  I think if you read further down in that topic, you would have seen that the OP had that mistaken belief based on the fact that they misread the post he was quoting.

 

"Nested loops have their places but in your code are likely complicating things more than they simplify them."

What alternatives should I follow?

This is a tough one.  All I can say is that the more experience I gained from using LabVIEW, the less I used nested loops.  I can't exacty say why, though.  It just seemed that I used them less often.

 

"Do not dequeue from a queue in more than one place."

I have two queues in the code, which get dequeued at two locations. The third dequeue segment is disabled. I meant to delete it earlier but never got around to doing that. Do structures under "Diagram Disable" get compiled when executing the code?

Once you dequeue something, it is gone from the queue forever.  It's on a first-come first-serve basis, so multiple dequeues will always be racing each other to see who gets the data and who is left out - i.e., race condition.  It's likely you are missing pieces of data and you don't even know it!

 

[edit] I think I msunderstood this part.  If you meant "two different queues with each being dequeued only once" then my advice - while still true - doesn't apply.  [/edit]

 

Solutions:

Look at the Producer/Consumer Design Patterns. They show the best practices methods for operating loops in parallel.

I tried to follow the P/C design. The second block in the design (which contains a lot of nested loops) is the producer where the data is being acquired and the third block all the way at the bottom is where the data is being dequeued and written to the disk. 

 

When optimizing for speed and memory usage consider these factors:

Do nothing else in the acquisition loops except the actual acquisition and enqueuing the data. All analysis and saving should be done in parallel loops with sufficient buffering (usually the queues) that the speed of those loops does not limit overall performance.

Do not do any formatting or calculations on the data in the acquisition loop.

I can revise the code to implement these suggestions.

This is perhaps the BIGGEST thig you can do to optimize your code.  However, this is an optimization.  This may or may not be useful in your present code and may even be detrimental or damaging with the code in its current state.

 

Do not display images on the front panel. This likely makes an extra copy and is certainly slow.

Although there are multiple display panels, there is only one (or two) that work. All others are disabled.

 

Do not configure or change parameters on the image devices while in the acquisition state.

We never actively make any changes to the configurations of the imaging devices. However I realized that the code would actually permit that activity, which implies that some CPU resources may be polling for these parameters. I will change the code to avoid this.

 

I look forward to your response. Thank you very much for your help, in advance.

 


I have comments in the sections I felt qualified to answer.  :smileyhappy:

Re: connecting labview with oracle database

Re: how to do this program?

$
0
0

lorddd337 wrote:

I figured out where the symbols are and such. 

 

Can you explain how you went to class and not know where the arithmetic functions were until now?????

 

 

Re: how to do this program?

$
0
0

Dennis_Knutson wrote:
Your arithmetic is not at all right. You should go back to the flow chart that you created (or should have) and rethink it. One problem is the way you use the discount.

A flowchart? Him? 

 

It sounds like he rolled out of bed on Friday, and realized that he has an assignment due for this class for Monday.

Viewing all 191391 articles
Browse latest View live




Latest Images