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

Re: Application Builder stuck on "Building Application..."

$
0
0

Another data point is that after staring at "Building Application..." for several minutes, I can click Cancel to cancel the build and the status will say "Canceling..." but that never completes either.  I can close the Build status dialog box while it still says "Canceling..." but then LabVIEW seems locked up and unresponsive in the project window.  I end up having to kill LabVIEW with task manager.


Re: Number array to boolean array

$
0
0

 wrote:

It looks like you are using the Number to Boolean Array primitive.  This converts a *single* number to an array of Booleans.  One way of converting an array of integers to an array of Booleans is to just pass it to the Greater Than 0? primitive.  Any value in the input array that is greater than zero then results in a TRUE value in the output array.


I use "greater than zero" just because my mind accepts "greater than zero" a little more readily than "not equal to zero".  I guess that's because it's a tiny bit less ambiguous.

Implementing a REST API, Issues with Web Services

$
0
0

I'm looking to add a simple REST API to a couple RT targets.  Right now I'm using a webservice, which is included as part of the rtexe build.  This allows HTTP GET,POST, etc. requests to http://[target IP]:8080/API/[method].

 

The API is not transferring large amounts of data or being called very frequently, it's just used to provide some basic status information about the target in a way which can be accessed with common web-based techniques (versus going through something like the system config API or creating some custom TCP/UDP implementation, etc.).  This is to make it easy to integrate into a custom web panel for some basic status and monitoring of a system, which in this case is composed of several hardware targets.  We do not have access to system link.

 

It works fine initially, however, the webservice eventually stops responding to requests.  I reduced the inactive connection timeout in the embedded webservice conf and this help by extending the amount of time before it becomes non-responsive, but does not solve the problem.

 

Is there some bug with webservices which causes them to hold connections open even once closed and so these are stacking up until the connections limit is reached?

 

Does anyone know of another relatively straight forward way to implement a REST API (server side, not client) outside of webservices in native LabVIEW without resorting to some home grown implementation?

Re: Install LabView 2019 on hard drive other than C:

Re: boolean inside cluster

$
0
0

 wrote:

Rather than posting in a 10 year old thread, you would be better served if you created a new message thread.

 

Without knowing exactly what you are trying to do, and not wanting to dig into all these old messages to try to figure out which one your question is based off of, I answer this way.

 

If you have one element of a cluster you want to change, then you use unbundle by name followed by a bundle by name to modify that one element of the cluster.

This is probably covered in one of those free LabVIEW tutorials under Training Resources at the top of the LabVIEW forum.


You don't really need to unbundle it, I don't think.  Just bundle the new value into the cluster - that is, unless your goal is to modify the value in the cluster and not replace it.

Re: boolean inside cluster

$
0
0

 wrote:

 wrote:

Rather than posting in a 10 year old thread, you would be better served if you created a new message thread.

 

Without knowing exactly what you are trying to do, and not wanting to dig into all these old messages to try to figure out which one your question is based off of, I answer this way.

 

If you have one element of a cluster you want to change, then you use unbundle by name followed by a bundle by name to modify that one element of the cluster.

This is probably covered in one of those free LabVIEW tutorials under Training Resources at the top of the LabVIEW forum.


You don't really need to unbundle it, I don't think.  Just bundle the new value into the cluster - that is, unless your goal is to modify the value in the cluster and not replace it.


He was talking about decrementing the value in the cluster.  So he needs to unbundle it first to determine what it is, and the bundle it back in once that value is decremented.

Com port and device setup menu

$
0
0

Is there a good way to have a setup menu for comport and other instruments?  I am trying to avoid having them on the front panel of the main application.  It could be a pull down or popup.  I have 5 or 6 devices that are on comports or have visa resources assigned to them through Max.  I would need to select comport or visa resource, baud rate.....  for the devices.  I now have a cluster on the front panel with this.   

Re: Number array to boolean array

$
0
0

I still (partially) recall some language or environment I used way back in the 90's (maybe even the 80's ?) where booleans were typically signed ints with a -1 value (all bits set high).  As I recall, any non-zero integer value would evaluate as True, positive or negative alike.  A "greater than 0" comparison would have wrongly missed all the built-in boolean constants.

 

So my habit would be to check "not equal to 0" so I don't have to check to see whether the int is signed or unsigned.  (I'm pretty sure this came up in another thread not all that long ago, but I couldn't find it easily just now.)

 

 

-Kevin P


Re: Communicating with specific pins of a serial port?

$
0
0

I had a talk with Jacob at Techron and he said it's okay to just send a continuous 125khz sine wave just normal through the unbalanced bnc in the front of the box. I don't know a whole lot about the voltages yet but my analog discovery can only do a max of +/- 5v but the amplifier can take up to +/- 10v but I might not need that much. I also just discovered from a colleague that you can't use the BNC adapter board on the Analog Discovery 2 to send out a wave, it is only for reading so I hooked up a break out cable for all the pins and what I have to do is wire individual pins to an aligator clip to bnc cable and route the signal that way. In this case it would be W1 pin which is the yellow cable. 

 

AD24.png

 

IMG_20200513_164056.jpg

 

52b9c9d6152b1d6971de1ce2de6281c6.png

Re: Communicating with specific pins of a serial port?

$
0
0

I'm not familiar with the Analog Discovery, but the LabJack U3 will not be able to create a 125 kHz sine wave.  It can easily create a 125 kHz square wave where the low is 0V and the high is 3.3V.

 

https://labjack.com/support/datasheets/u3/hardware-description/timers-counters

 

https://labjack.com/support/datasheets/u3/hardware-description/timers-counters/timer-mode-descriptions/frequency-output

 

Try it first using the Test panel in LJControlPanel, then go to our LabVIEW examples:

 

https://labjack.com/support/software/examples/ud/labview

 

Re: Communicating with specific pins of a serial port?

$
0
0

Thank you very much. I'll give the LabJack a go as well. I will probably need it for another part of this project as well a bit later on.

Undefined Symbol = NiFPGA_ReadSgl

$
0
0

I have a LabVIEW FPGA program that has a SGL indicator on.  I am trying to use LabWindows to read that indicator using the function NiFPGA_ReadSgl.  LabWindows gives a link error of "Undefined symbol" as if the library does not have the code, but the NiFPGA.h file has it defined.

 

Is this a future upgrade or is the library corrupt?

Re: Undefined Symbol = NiFPGA_ReadSgl

Re: How to use PXI6624 to measure speed and draw a waterfall diagram?

$
0
0

Unfortunately, most of the "interesting" stuff will be down inside those various special-purpose toolkit vi's.  You mentioned Sound & Vibration, but I see a bunch of "O.A.T." icons that I suspect relate to the Order Analysis toolkit.

 

I don't have either one, nor do I have any familiarity with those functions.  I'm also not at all experienced in the seemingly specialized field of monitoring vibrations on rotating machinery and performing order analysis.  I just have excellent knowledge of counters under DAQmx, rudimentary knowledge of frequency domain analysis, and beginner-level knowledge of producing a 3D waterfall graph (to map out a 2D spectral response through slices of time).

 

Maybe someone else that knows the field and the DAQ hardware will join in and give more detailed help?

 

Meanwhile, here are a few thoughts based on fundamentals.

- Is the rotational speed nearly constant?  Then the vibration data alone would probably allow you to generate a useful waterfall graph.   Not *perfect*, but at least useful.

- If the speed is nearly constant, it seems like you could do a very simple speed measurement with the counter task, and use that nominal speed to scale your frequency domain data from Hz to unitless "order numbers".

- Several challenges arise if the counter measurements are meant to compensate for significant changes in rotational speed during your measurements.  I expect those toolkit vi's do a nice job of handling all this stuff for you.

   If I had to deal with this, I would resample the vibration data to make it equally spaced in *rotation angle* rather than in time.  I would use a quadrature encoder and configure an angle measurement task.  I would export the DSA device's sample clock and use it as the sample clock for my encoder task.  I would then be able to capture vibration vs. time and angular position vs. time.  In post-processing, I could resample to figure out vibration vs. angular position.  (It would probably be necessary to compensate for the signal path delay of the DSA device during this post-processing.)

  So now I could have a pseudo-waveform where the "dt" value is really a "delta position".  For order analysis, I imagine I'd use "# rotations" as the position unit to feed into the "dt" field of the waveform.  From there, I would split up all this measurement data into slices that each contain some integer # of rotations worth of data.  I'd do freq domain spectral analysis on each slice, accumulate all the results, and display them in a 3D Waterfall Graph.

 

It seems to me that this kind of approach ought to be a decent starting point at least.

 

Now after all that, let me try to answer a couple specific questions.

 

Counters are very flexible.  One can often exchange which counter input receives which signal in order to approach a measurement differently.  In your example, the encoder signal is being treated like a sample clock.  You'll take one sample at each tooth.  So the question is, *what* are you sampling?  Well, you're sampling a count value.  The count value is being incremented at 20 MHz.  The effect you get is to capture a *timestamp* of the instant when each tooth first registered its presence.  This is just another way to get a relationship between time and position.  This one captures counts at equal angles while measuring the variable time between them.   Other methods capture counts at equal time spacing while measuring the variable distance between them.

 

The sample rate input value to DAQmx Timing should be set to the max expected encoder frequency.  The main (maybe only?) reason is that DAQmx uses the sample rate value to auto-size its task buffer.  (And please consider my Idea Exchange post here if you agree that it would be helpful if the DAQmx API made some of this stuff more clear).

 

 

-Kevin P

Change input controls during execution of a loop?

$
0
0

I have this program that works alright however, I would like to be able to let the user change the controls during the main loop and have it alter the parameters to the "Configure Standard Waveform" block in real time, like a real oscilloscope. I have tried moving some of the controls into the loop but it does not allow me to route them backwards into the initializer functions that I need to be outside of the loop for setup, as the same parameters need to be used before the loop. 

 

f298384352dd401d6e9803b714fb3cc3.png

 Is there also a way to have the program run at the flip of a toggle switch and off again however many times the user wants?

 

 


Re: Install LabView 2019 on hard drive other than C:

$
0
0

I reported the link as broken and they must have fixed. It was broken yesterday. 😉

Re: Undefined Symbol = NiFPGA_ReadSgl

$
0
0

Terry,

 

I get this

 

Build Status (95002 Innovate Test Diagnostic.prj - Debug)
 95003 FPGA Support.c
 Link 95002 InnovATE Test Diagnostic.exe
  error: Undefined symbol '_NiFpga_ReadSgl' referenced in "x:\Engineering\Engineering Services\Manufacturing Test Engineering\Projects\SVN\95002 - InnovATE Test Diagnostic\cvibuild.95002 Innovate Test Diagnostic\Debug\95003 FPGA Support.obj". 
Build failed.

Re: LabVIEW 2020 TLS Question

$
0
0

We didn't update the FTP nodes, if that's what you're asking.

 

To be honest, the thought came to mind, but I thought the customer applicability was entirely theoretical. Do you actually possess an actively-used FTPS server?

Re: Create a square wave

Re: Number array to boolean array

$
0
0

 wrote:

I still (partially) recall some language or environment I used way back in the 90's (maybe even the 80's ?) where booleans were typically signed ints with a -1 value (all bits set high).  As I recall, any non-zero integer value would evaluate as True, positive or negative alike.  A "greater than 0" comparison would have wrongly missed all the built-in boolean constants.

 

So my habit would be to check "not equal to 0" so I don't have to check to see whether the int is signed or unsigned.  (I'm pretty sure this came up in another thread not all that long ago, but I couldn't find it easily just now.)

 

 

-Kevin P


That was something I never knew!

Viewing all 203111 articles
Browse latest View live


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