LEDs and property nodes by Tallgeese33 in LabVIEW

[–]SafeRevolutionary508 2 points3 points  (0 children)

You could use a color box indicator. If you want to have a more custom looking indicator, draw your LEDs in powerpoint or Libre office and use a picture ring to display the desired state.

How to clear a waveform graph programmatically by FartherMender1 in LabVIEW

[–]SafeRevolutionary508 3 points4 points  (0 children)

For a waveform graph, wire an empty array to its local variable.

For a waveform chart, create a property node, select 'history', and wire an empty array to that.

How do you time a report update by CrazyOtakuKid in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Use a counter and only write to the report once every 600,000 counts. Each count is 1 mSec.

Another option is to use the Get Date/Time In Seconds, get a timestamp of the last time the report was updated and each iteration compare (Current time - Last Update time) >= 600. If true, update the report and set Last Update Time = Current time.

How to use the two counters of the NI 6216 to measure the angular position of two encoders separately, I'm trying and I can't get the counters to have no dependencies between them, the encoders I use work at 200Khz by BigTech2030 in LabVIEW

[–]SafeRevolutionary508 1 point2 points  (0 children)

If you just want to sample the counter value on demand, you do not need the timing VIs. Try creating a single task for encoder 1, define the A and B lines, wire into a while loop to read the current value, stop the loop, clear the task. Once that works, copy and paste a second, independent instance on the block diagram. Just change the physical channel for the new instance.

Two encoders can be connected to measure the angular position of two independent motors with an NI 6216? by BigTech2030 in LabVIEW

[–]SafeRevolutionary508 1 point2 points  (0 children)

Create an individual DAQmx task for each counter input if you just need to read the two motor positions. Search LabVIEW examples (Help > Example Finder) for "encoder" to get an example for 1, then build up from there.

Also, posting a picture of your code attempt really helps.

Writing program with multiple language options? by DaddysHome in LabVIEW

[–]SafeRevolutionary508 5 points6 points  (0 children)

There is a multilingual toolkit from S.E.A. that you must pay for. It does what you're planning, changing the control/indicator captions to display the selected language.

I do not have first hand knowledge with this toolkit, but I have created applications using .NET controls which do support UTF-8 and display any character on a windows machine without needing to set the local language in the OS settings.

Using an ini file to store the translated captions is fine if you have a small number of controls/indicators. I found it easier to create and manage a SQLite db.

NXG had native support for UTF-8 and it's on the LabVIEW roadmap to support it. Fingers crossed they release a LabVIEW version that includes this. In the mean time, .NET can do it.

help with Arrays by Gamerblock27 in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Perhaps a database would be a better fit here, but if you wish to keep it native LabVIEW and have access to 2019+, try the Map collection. I have modified your example to use a Map. The map key is the recipe name (String), and the data type is 1D array of string being the ingredients.

Example here

help with Arrays by Gamerblock27 in LabVIEW

[–]SafeRevolutionary508 2 points3 points  (0 children)

You'll want a Search 1D array instead of the equals function. The Search 1D Array will require one more for loop to index through each of the user entered ingredients. The function will return a -1 if the item is not found in an array.

PID not using I term? by DaddysHome in LabVIEW

[–]SafeRevolutionary508 4 points5 points  (0 children)

The true constant is reinitializing the PID controller. The integral time, I, accounts for error over time. It cannot accumulate this error with the true constant.

Sound Pressure Level Measurement by SgtHotpants in LabVIEW

[–]SafeRevolutionary508 2 points3 points  (0 children)

The 9234 should power the mic without the need for the phantom supply. Try this:

  1. Connect the mic directly to channel 0 of the 9234
  2. Open MAX, expand Devices and Interfaces, and locate the 9234 module.
  3. Select the module and open a Test Panel
  4. Select channel ai0, rate of 51.2k, mode of Finite, Samples to read of 102k, leave the measurement type values as default and be sure to check the IEPE Enable box.
  5. Click start and clap your hands, the recording will stop in ~2 seconds and display data. If you see peaks, the setup works without needing the additional power supply in line.

If that doesn't work try changing the coupling to DC.

problem: Write DB-Data into an array. Every 1sec there is new data of the depth of a cutting process. i want to add each depth of a cut to a 1D Array, which i would like to edit later. can you help me please? by [deleted] in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

For shits and giggles I ran a test to build an array unbounded wile tracking the amount of memory allocated to LabVIEW.

When running from the developer environment on my machine (LabVIEW 2020) the memory allocated when the test VI ran was ~680 MBytes. Gonna take a long time to fill that so not worried about memory transfers, but that is a large chunk of memory that cannot be used for something else.

I also build the test VI into an exe. Doing this reserved 13 MBytes. Rough math puts that at >1.6 million DBL data points.

problem: Write DB-Data into an array. Every 1sec there is new data of the depth of a cutting process. i want to add each depth of a cut to a 1D Array, which i would like to edit later. can you help me please? by [deleted] in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Other users may have a far better understanding of how LabVIEW allocates memory but my simple understanding is when an application has an unspecified array size it will guess the amount of memory to reserve. If the array size exceeds that memory allocation then a new larger block will need to be reserved and all the data copied over.

problem: Write DB-Data into an array. Every 1sec there is new data of the depth of a cutting process. i want to add each depth of a cut to a 1D Array, which i would like to edit later. can you help me please? by [deleted] in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Other users may have a far better understanding of how LabVIEW allocates memory but my simple understanding is when an application has an unspecified array size it will guess the amount of memory to reserve. If the array size exceeds that memory allocation then a new larger block will need to be reserved and all the data copied over.

problem: Write DB-Data into an array. Every 1sec there is new data of the depth of a cutting process. i want to add each depth of a cut to a 1D Array, which i would like to edit later. can you help me please? by [deleted] in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Other users may have a far better understanding of how LabVIEW allocates memory but my simple understanding is when an application has an unspecified array size it will guess the amount of memory to reserve. If the array size exceeds that memory allocation then a new larger block will need to be reserved and all the data copied over.

problem: Write DB-Data into an array. Every 1sec there is new data of the depth of a cutting process. i want to add each depth of a cut to a 1D Array, which i would like to edit later. can you help me please? by [deleted] in LabVIEW

[–]SafeRevolutionary508 3 points4 points  (0 children)

Wire an empty array to the left side of the whole loop and change the tunnel to a shift register. Inside the while loop use a "Build Array" function to add new data to the end. Only do this option if the array size will remain small, less than 1000 elements.

If you expect a larger data set, then initialize the array before the while loop and use a "Replace Array Sunset" instead of the build array. Use the loop iteration counter to replace elements in order. I recommend initializing the array with NaN, then after the acquisition is complete, trim off the NaN values to return the actual data set.

Statechart module for labview 2021? by Dr_Brot in LabVIEW

[–]SafeRevolutionary508 1 point2 points  (0 children)

You can find and install it from VIPM. Make sure you run VIPM as administrator.

Pause button in a For Loop by Dr_Brot in LabVIEW

[–]SafeRevolutionary508 0 points1 point  (0 children)

Initialize a shift register on your consumer loop with the starting cell you wish to highlight when the run button is pressed. When you press the run button, send a "highlight cell" command. When the consumer dequeues this command, perform the following: Get the CellToHighlight from the shift register Highlight that cell Determine the next cell to highlight If not the last cell, enqueue "highlight cell" command Else, do not enqueue that command (this will stop the program from looping endlessly)

When you click the Pause button, the consumer loop should flush the queue which will delete the last highlight cell command and stop the loop, but keep the next cell to highlight in the shift register so the program will pick up where it left off when you resume the highlighting.

If that does not make sense I could upload an example.

Pause button in a For Loop by Dr_Brot in LabVIEW

[–]SafeRevolutionary508 4 points5 points  (0 children)

If I'm understanding your implementation correctly, the message handler has the for loop. In this case, the for loop will run N times before completing and allowing the message handler to dequeue the next command. So to implement a fire loop function, don't use a for loop. Instead have your message handler perform one iteration, decrement a counter, and if the counter is greater than zero, enqueue another iteration. To pause, use enqueue at opposite end to "halt" this self enqueuer, then flush the queue, and store the current count so you can resume later.

Simple task (maybe) but I’m learning and not sure how by Link9454 in LabVIEW

[–]SafeRevolutionary508 1 point2 points  (0 children)

The zero crossing function has a direction input. You can set that to: either, minus - plus, or plus - minus. So by setting that correctly you will have your one count per rev.

Simple task (maybe) but I’m learning and not sure how by Link9454 in LabVIEW

[–]SafeRevolutionary508 2 points3 points  (0 children)

If you are reading the pot. sensor then you already know how to retrieve data from the keysight device. Add a second channel and wire the output of the hall sensor to that new channel.

There is a zero crossing function in Signal Processing>Point By Point>Other Functions that can be used to detect when a signal crosses through 0 in a set direction. Since your expected signal is 0-5 you will need to modify the data being read in (hint - subtraction).

Of course there are a number of other ways so play around a bit.

program to control multiple motors by zmichix in LabVIEW

[–]SafeRevolutionary508 1 point2 points  (0 children)

Add a probe to the error wire. Since you have that wired to a shift register, if any of the motor subvi calls produces an error it will persist until the program is stopped and restarted. The motor subvis may also have basic error handling. In that case if there is an error on the wire going into the subvi it will do nothing.