Quantcast
Channel: LabVIEW topics
Viewing all 66700 articles
Browse latest View live

cRIO IMAQ: Writing time images to string then to JSON

$
0
0

Hardware I am using:

  • cRIO-9035
    • Dalsa GigE Nano M1930 NIR

Software I am using:

  • LabVIEW 2018
    • JKI Tools Library
    • NI IMAQ Vision Express

About the issue:

I'm trying to acquire images at several different time intervals. I set up an array of the time intervals and hacked together some condition statements (I don't know if this is the correct way to do something like this, this is my second week using IMAQ). When the capture command is given the images are flattened to a string. I'm trying to append to the string by using concatenate string, but it doesn't appear to be working.

 

Right now it is only writing one of the images into JSON formatting. I've attached the output text for you all to look at. Not exactly sure what the issue is since no error is being produced.

 

This is the segment of timed capture that I'm not sure about. I imagine there is a much more forward approach to this, so hopefully someone can point me in the right direction. I want the time intervals to range from 2^-4 to 2^10 milliseconds. Where the first capture is at 2^-4 ms, the second at 2^-3 and so on

Timed Capture.png

 

 

Here is where I am trying to convert the information to JSON format. As you can see I am flattening the image to a string, then clustering everything together. Once all the information is clustered, I flatten the variant to a string. This is where I try to concatenate the strings to before converting back to a variant.

Converting to JSON.png

 

 

 

 

Also, ideally my JSON output would look like this:

{
    "Image_1":{
          "Image_Time": time,
          "Image_Binary":image binary data
    }
    "Image_2":{
          "Image_Time": time,
          "Image_Binary":image binary data
    }
    etc.
}

 but that isn't as important as the timing and appending issues


Request Deallocation Function

$
0
0

I have taken over a LabVIEW program with over 500 VIs.

 

The former programmer uses Request Deallocation Function in numerous places.

 

Good, bad, indifferent?

 

 

New problem: How can I use DAQmx timing in the loop instead of "wait" vi?

$
0
0

Dear NI family,

 

Hi there!

 

1. How can I use DAQmx timing in the loop instead of "wait" vi?

 

I hope to use the function of DAQmx Timing, such as setting timing sources, changing duty cycle of timing, setting rate and samples per channel.

 

2. When I click the button "STOP", there always will be LEDs turned on, what should I do to shut all the leds down when I click the STOP button?

 

Could you please show me how to fix the problems? The code is in the attachment.

 

Thanks a lot!

 

Best,

Jason

Using Tessract DLL

$
0
0

Hello,

I use Tesseract.exe in my application (LV13) rather rudimentary (with repeated disk access) and I would rather use the DLL (or .NET) available.

But I did not understand everything about the classes used ...

Here is the rudimentary version but works well:

Tesseract_1.jpg

And what I would like is something like below (only for example, I'm not sure for the functions used...) :

Tesseract_2.jpg

Would someone help me on this subject ?

Thanks.

Reading .raw sound files in Labview

$
0
0

Hi, I have .raw (acoustic signal files) which need to be read and subsequently analysed. The file is about 10 yrs old (in case format has changed). The file is cocverted to idf format in the old system (which we are upgrading). We are not able to read it anyways. Can somebody please help us how we can directly read it in LabVIEW.

Converting an X310+TwinRX to a USRP-2955

$
0
0

Hello,

I'm currently working with an X310 with two TwinRX daughterboards installed and would like to use it as a USRP-2955. I've run through the instructions from https://kb.ettus.com/Converting_an_X310_into_an_NI-USRP_Rio and power cycled all the devices, but I still seem to be having trouble getting the "Simple NI-USRP Streaming 2945 2955" project to run. I run into the error: Error 61206 occured at Read/Write Control in COnfigure Frequency Shift ... LabVIEW FPGA: The configured item does not exist."

 

In the NI-USRP Configuration Utility, the device shows up as "X310/TwinRX Rev A/Unknown/rev8". Do I need to run some other kind of conversion to have it appear as a USRP-2955, or should it still work with the streaming project? Does the "Unknown" signify there is a problem with the second daughterboard, or is that a placeholder from some other device information?

 

I have NI USRP 17.1 installed and am using LabVIEW 2016. I have no problems running projects with a USRP-2942, so I assume this is a hardware conversion problem with the X310+TwinRX. I have also created very basic FPGA test compiles using only the 40 MHz clock domain without the register bus controls/indicators/subVIs, and these bitfiles run just fine. It seems to problem comes from trying to access a configuration of the daughterboards.

 

I appreciate any help, thanks!

Bar graph and serial communication

$
0
0

Hi,

 

I want to generate bar graph in lab view which will look like as per attachment. 

Data are coming from Arduino via serial communication.

Can any one help me to receive data via serial communication (COM PORT) on Lab VIEW and display as bar graph on Lab VIEW.

 

Bar graph and serial communication

$
0
0

Hi,

 

I want to generate bar graph (please see attachment) for serial data coming out from Arduino.

Data coming with baud rate of 9600.

 

Can anyone help me to complete this task?


Interactive Camera/2D Image Viewing: Intensity Graph vs 2D Picture

$
0
0

I'm a VI for interacting with camera image data.  I have so far considered using intensity graph and 2D picture controls but both have problems.  I wanted to see if the community had any thoughts

 

Spec:

Raw data coming in is a 2D array of U16.  Roughly 1000x1000 at most. I'm planning incorporate zoom and autoscaling functionality at a minimum. I want only nearest neighbor interpolation.  Ideally should be performant up to about 30 fps

 

Issues:

1) The intensity plot will make it difficult to allow the user to draw boxes and such to select a ROI.  The only way I can think to do this is a picture overlay.  I'm concerned overlaying a picture control with the intensity plot will give performance issues.  

(https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kHjFSAU)

The intensity plot however makes it easy to keep nearest neighbor interpolation

 

2) The picture control avoids the overlay complexity issue above (single drawing a square when the user mouses down in a picyture control is straightforward).  However, I can't see any way to easily have the ROI-zoom in have the nearest neighbor filtering.  The filtering used by the 'zoomFactor' property is apparently not even controlled by LabVIEW (?!) and may vary depending on the zoomfactor and the # of pixels.

(https://forums.ni.com/t5/LabVIEW/Disabling-image-quot-zoomfactor-quot-filtering/td-p/811302/page/2)

I imagine I could upsample the image but I am not sure how this would turn out.

 

Attached some code sandboxes to play with. 2D picture ones are snippets, but I attached the VI for the image control as that already has a bunch of events.  (hit z or the zoom-button and draw a box to zoom)

 

 

Thanks for any thoughts,

(DAQmx NI USB 6210) How to export/have access to armstart trigger signal of a counter input if you are triggering it by itself

$
0
0

Hi,

When carrying out counter input task (edge counting) with my NI USB 6210 device, I use Arm Start trigger with trigger source set to be the same counter input source (so it starts counting edges immediately when seeing an edge after starting the task).

I'm trying to have access to this start edge/signal so that it can be used to trigger another task, but I don't see how to do it.

(I wouldn't consider using another Digital input as trigger for both tasks as it wouldn't tell me the exact time when the edge is arriving.)

Anyone can help me with it? Any advice would be much appreciated.

Attached is a snippet of the part of vi.

Posting Data to a Remote Front Panel VI

$
0
0

Hi All,

 

I wanted to open the remote front panel of a VI in one system in a web browser of another system and post data to it when opening. I am able to open the front panel of the remote VI by using the method in this link, but I am not able to post the data. Please let me know if this is possible and how to do it.

 

Thanks,

Sree Ranjani

both tabs are overlapping( VI attached)

$
0
0

I'm using 2 tabs in my project (tab for login and tab for calculating)the problem is both tabs are overlapping please help 

Compatibilité Multimètre et Multiplexeur

$
0
0

Bonjour à tous,

 

Je possède un multimètre PXIe 4081 1voie et un multiplexeur PXIe 2527 32voies (différentiel) ainsi qu'un contrôleur PXIe 8821 pour faire l'acquisition de données de tension (µV).

 

Est-il possible sur LabVIEW de connecter le multimètre avec le multiplexeur ?

Afin de fermer une voie de mesure ddp avec le multiplexeur puis de faire l'acquisition de la tension et de l'enregistrer avec le multimètre, ensuite d'ouvrir cette même voie et de passer à la suivante avec le multiplexeur.

 

Est ce qu'une structure séquence déroulée suffit ? Sachant que je dois faire l'acquisition des 32 voies de mesure ddp puis de reboucler ces mesures 10 fois toutes les secondes.

 

D'avance, merci.

LabVIEW Core 1 v2015 Exercise 9-4B and 9-4C

$
0
0

Help me please, having a lot of trouble on figuring out where to start with these. If you could include code and an explanation that would be much appreciated. These are the exercises:

 

Exercise 9-4B Challenge
Goal Create a VI that takes the property name as input and returns the associated property value.
Scenario Your file header includes a variable number of property names and values. After reading the file, you want to programmatically access the property value for a given property. For example, in this exercise, one of the properties was “UUT Serial Number”. You want to programmatically search for “UUT Serial Number” and then return the serial number value (e.g., “A12345”).
Description After reading the spreadsheet string into memory, use a modular approach to create a VI which finds the row index of a property name. Then use the row index to return the property value. If the property name isn't found, the VI should return a descriptive error.

Exercise 9-4C Challenge
Goal Create a VI that creates tab-delimited column headers for an arbitrary number of channels.
Scenario The MultiChannel Write VI can write data for an arbitrary number of channels using a two dimensional array. You want to create a channel header for each channel of data. Since the number of channels is arbitrary, you need a scalable approach which allows for a variable number of channel headers. For example, if you have three channels of data—temperature, pressure, and strain—you want to write the data to a file with the following headers: Temperature, Pressure, and Strain. To format the file correctly, you want to use the same delimiters in the header as in the channel data. For example, if the channel data is tab-delimited with each line terminated with an end-of-line character, you want your header to be formatted the same way.
Description Create a Write Channel Data with Headers VI which you call prior to your MultiChannel Write VI that writes a channel header for each channel of data. The VI should take an array of strings as input. Your subVI should write the strings to file so that a tab separates each string and the line is terminated by an end-of-line character.

LabVIEW PWM

$
0
0

Is it possible to generate a sinusoidal PWM using RIO or DAQ?


LabVIEW myRIO drivers

$
0
0

Iam not able to install the Real time Rio and FPGA drivers in myRIO 

what should i do?

 

I tried resetting myRIO in NI MAX but there is no option displaying for reset/format NI myRIO

Difference Between Getting CPU from System Resource vs. RT Get CPU

$
0
0

Hi,

 

I was wondering what is the difference between getting the CPU load from System Resource -> CPULoadTotal and getting the CPU from RT Get CPU Loads? 

 

Best,
Pegah

LabView exercise 9-4B help

$
0
0

Version:1.0 StartHTML:000000251 EndHTML:000028571 StartFragment:000027596 EndFragment:000028394 StartSelection:000027596 EndSelection:000028394 SourceURL:https://forums.ni.com/t5/LabVIEW/LabVIEW-Core-1-v2015-Exercise-9-4B-and-9-4C/m-p/3808636 Re: LabVIEW Core 1 v2015 Exercise 9-4B and 9-4C - Discussion Forums - National Instruments

This is the exercise below. I have included the code I have so far, not sure how to create/read the file which searches UUT serial numbers, if someone could help with that or sees any errors in my current code that would be appreciated.

 

Exercise 9-4B Challenge
Goal Create a VI that takes the property name as input and returns the associated property value.
Scenario Your file header includes a variable number of property names and values. After reading the file, you want to programmatically access the property value for a given property. For example, in this exercise, one of the properties was UUT Serial Number. You want to programmatically search for UUT Serial Number and then return the serial number value (e.g., A12345).
Description After reading the spreadsheet string into memory, use a modular approach to create a VI which finds the row index of a property name. Then use the row index to return the property value. If the property name isn't found, the VI should return a descriptive error.

How to synchronize two counter output

$
0
0

Hi, 

I have some issue related to synchronizing two counter output.

I use sample clock to match time interval between two counter output. 

But, when I check the two counter output by using a oscilloscope, time interval between two counter output is not constant (For example, the time interval in 1st measurement was 1ms, but the time interval in 2nd measurement was 5ms.)  

How should I do in order to synchronize two counter output ? 

Here is my VI and the diagram  

Thanks

 

06222018-1.jpg

Using a format into string to output multiple values in each column

$
0
0

Hello everyone,

I have been messing around with getting this portion of a VI working. I've mocked it up to simulate what it going on. I want to take data values from within a for loop (the one outside the sequence structure) and take that data, turn it into a string, and output the data in different columns. I seem to have this working the way I want it; however, I cannot seem to ever receive more that the last line of data collected. I've attempted to add a index array between the two for loops to have all the tunnels indexing but that did not work either.

 

Cheers.

Viewing all 66700 articles
Browse latest View live


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