Quantcast
Viewing all 202521 articles
Browse latest View live

Re: Disable button using Property Node

If In Range? and Bottom are both True in any given iteration of the loop, you will write to the serial port two times with only about a millisecond between the writes. Is this what you want? Can the remote device handle two sequential writes?

 

The code in the two case structures is identical. It is usually better to make a subVI of duplicated code. Then if it ever needs to be changed, you only need to change it one place.  If you use Number to Decimal String, you only need two cases on the inner case structure.

 

It is not neccesary to have two VISA close functions for the same session. In fact one of them will always generate warning 1073676418: The specified object reference is uninitialized.

 

Here is a version cleaned up a bit with most of the changes above implemented.

 

Lynn


Re: Generating and Acquiring at the same time, DAQ USB-6356

Hello TuiTui,

 

So, for the Generator :

 

I use 2 "Simulate Signal" wired to a "DAQ analog output". Frequency, amplitude and phase are set by 3 control.

 

Setting of both "Simulate Signal" : Samples per second = 3M , Number of samples = 100k , Run as fast as possible

Setting of DAQ Output : Continuous Samples , Samples to write = 100k, Rate = 3M

 

For the Acquire :

 

I use one DAQ analog input.

 

Setting is : Continuous , Samples to read = 20k (Control in front panel), Rate = 1.25M (Max value)

 

Thanks

Re: Single Cycle Time Loop

I omitted the blank loop. The I32 conversion is becuse of below tutorial of NI (I use I8 constant and convert it to I32 in the input of initialze array)

Maybe is it optimized to use a I32 constant and connect it to the initialize array?

Image may be NSFW.
Clik here to view.
Capture.PNG

The rotaion is because of adaptive filter algorithm. In every execution of the loop, the last element in the array must omit and one new data goes to the first element (like a FIFO). I don't understand keeping track of the index. Can I do these FIFO liked operation with keeping track of the index?

What about For loops, is there any optimized way to replace them?

Thanks

Re: Real Time Target

What about the issue of fulling the resources in RT? Is there any kind of such issues regarding to RT?

Re: scientific calculator using LabView?

Joel_Mulig,

 

Thank you for sharing your code. 

 

Some suggestions:

1. Refactor it to use the Event structure which was either not yet available or very new in 2003.

2. Refactor it to use a state machine architecture.

3. Eliminate local variables.

4. Eliminate sequence structures.

5. Eliminate Formula Nodes.

6. Add Dcoumentation to the VI Properties.

7. Create custom icon.

8. Enlarge the panel and buttons so the text is more legible. Screens tend to be much larger than they were 11 years ago.

 

Lynn

Re: Single Cycle Time Loop

I don't think these coercions are a problem that you need to solve explicitely.

 

You have an array of 20 elements that you constantly rotate while replacing the first element. For each rotation, all elements need to be moved around. You could easily keep the array elements in place and instead maintain an index in a shift register that keeps strack of the position of the oldest element so you know which one to replace next.

Re: Calculator help

Hey Joel,

 

Dispite being 11 years old, that is a great looking application! If you want to make it more visible/accessible to follow developers, you could condier posting it as a community example.

 

NI Developer Community

https://decibel.ni.com/content/community/zone

 

Head to the above URL, select the "documents tab" and then click the "Create a Document" link

 

Image may be NSFW.
Clik here to view.
Capture.JPG

 

Thanks for sharing!

Re: fpga: cannot update the timer on fpga via host.

Hi all,

 

after consultation with my supervisor, he recommended me to pass on the value to new or intermediate control first. then, update the control value which is connected to the loop timer with the value from that intermediate control. It will update the value of loop timer after one loop elapsed (when intermediate received value from host and update it to control connected to loop timer). It works very well now.

 

I don't know exactly the mechanism labview writing or updating value on fpga via host. But, it seems to me, in my case, there was a problem writing a value to the control that is connected to the loop timer where was running in relatively fast. So, the control kind of ignore/reject the new value as it is busy running the loop in fast speed.

 

Thank you again for replying my post, GerdW.

 

Kind regards,

Areku


Re: Single Cycle Time Loop

Keeping the constant as an I32 is using less memory.  With the coercion, you are actually adding an extra byte to the memeory (the initial I8).  Though, the compiler will turn that all into an I32 constant anyways.  But it just looks bad having the conversion straight off of a constant.

 

Keeping track of the array index is simple.  Just use a shift register.  The only remotely difficult part is taking care of the rollover, which is simply a comparison with a select.

Image may be NSFW.
Clik here to view.

Re: Real Time Target

RAM?  Harddrive space?  Maxing out your CPU?

Re: control 8 channels, with microsecond precision, outputs only

Hey,

 

Currently, your program is getting to the start VI for your Analog task, and then never leaves that while loop, because the while loop won't stop until the start vi throws an error. You should take out the while loop entirely (as a general rule, don't put start vi's inside of a loop, you normally just want to start a task once, and then write or read inside of a loop. If you take out that while loop, your program will be able to continue on to starting your digital write task. Also, don't have the wait until finished VI on the analog task, just run its wire throug the flat sequence structure.

Re: FPGA (PXI-7852R) Arb. Wave form resolution

Hello dthrash

 

I'll be testing these examples since we need to determine the limiting factor.

 

Regards

Frank R.

Re: Replace quotient and Remainder with Scale by power 2

Thanks for clearing that up. Image may be NSFW.
Clik here to view.
:smileyhappy:

I'm so distant from that field that FPGA and RT were in the same pot for me.

Learned someting.

Re: Generating and Acquiring at the same time, DAQ USB-6356

OK so you are writing at 3Ms/sec and reading at 1.25Ms/sec and you wonder why there is a bit of discrepancy in the resolved frequency?  Ideally you would want the read and write to share a sample clock but at least selecting the same clock frequency (or one that is a multiple of the other) would go a long way to fixing that source of your error.

 

Second source of Error:  You are generating a contineous waveform.  unless you select "integer number of cycles" there is a discontinuity when the end is reached at an arbitrary phase and the phase is reset at the begining of the waveform.  The Write DAQ assistant can "Use Waveform timing" to adapt its timing parameters to the waveform dt and number of samples.

Re: SR630 Read Errors


array manipulation

I would like to manipulate and array like this.

 

12 42

22 32

13 43

23 33

 

to

 

12 42 13 43

22 32 23 33

 

How would I go about doing this?

LabVIEW crashing every time I try to run / compile a FPGA VI

I have a RT project using a cRIO-9012 / 9112, and every time I hit run on the FPGA VI, the compile process begins but immediately crashes LabVIEW.  The FPGA code is simple - just a development starting point that is essentially copied from the NI Example VI for the NI 9214 module.  I have LabVIEW Real-Time, LabVIEW FPGA, NI-RIO installed (LabVIEW 2013 32 bit running on 64 bit Windows 7 machine), Xilinx tools 14.4 installed.  The crash error report dialog is shown below:

 

Image may be NSFW.
Clik here to view.
FPGA crash.png

 

I have no idea what to try next to diagnose and correct the problem.  Thoughts?

 

Re: how to calculate the sum of the values of some columns of a table

Re: Imaging a Touch Panel Computer (NI TPC-2206) Compact Flash Drive

Hi,

 

I think the following attachments will be helpful. If you have many working TPCs, you can image the CF card and then push that image to the TPCs that are in a bad state. I created a couple of documents for accomplishing this. I would also recommend keeping an image handy so you don't have to keep re-imaging good devices.

 

Please do not distribute Norton Ghost to any customers. It is for internal use only.

 

Best,

Re: control 8 channels, with microsecond precision, outputs only

I believe i've worked out the task problems by using one of the examples as a guide.  My new problems is that I must put 8 number controls in the top array because it says it needs to match the number of channels in data with the number of channels in task (8).  I'm not quite sure how to adjust the array being sent to the buffer so that the boolean array columns represent the channels and the U8 array above only represents the timing structure.  i included an indicator array on the for loop output which confirms that i have something mixed up in how I'm structuring the array.  I'll include my updated program below, and once again thank you for all the help.

Regards,

Steve

Viewing all 202521 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>