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

Fixed number of points into an XY graph

$
0
0

Hi!

 

I'm communicating remotely to a platform (via wifi) to receive its inclication delivered by an on-board inclinometer.

I cannot fully manage interval between 2 samples for various reasons that I can't change.

I was then thinking of using a timestamp at the moment I'm requested the info and then to plot the results in an XYgraph.

 

Problem is that I want mygraph to be sweeping smoothly like with a chart, the the XYgraph is displaying "one full array" at a time.

 

The solution I came with is the following

XYSmoothGraph.png

 

It work fine, I have almost the result I want except that it is a bit epileptic ... The graph doesn't move point by point but section by section, making it difficult to read in real time...

The points are being updated smoothly, but the first point to appear on the graph doesn't "stick" to the side of the graph, so the curve moves forward, suddenly slides to the left leaveag the right side empty, and then fill in the right side again.

VinnyLaTaupe_0-1597851262922.png

 

Do you have any idea how I can solve that ?

 

PS: Instead of using the array solution where I mage its lenght by myself, I tried using a lossy engueue element, but then the question came on "how to put that element in an array ..." so in the end the problem was the same.

 

 

Thanks in advance for your help.

Vinny.

 

 


Upper and lower frequency loops during THD measurement

$
0
0

Hello,

 

   So I'm currently attempting to write a routine that checks the output power level of an amplifier, if the power level is within 1% of where it's expected to be, it takes a THD measurement. It then increases the frequency by 3% and repeats the sequence until the THD reaches a set limit. (Say 2%) Once the upper THD limit has been reached, the routine needs to go back to the starting frequency and decrease by 3% then take measurements until THD hits the lower limit.

 

My question is, is it possible to do both the upper and lower frequency measurements in one loop? Or would it make more sense to break them into two separate loops? I've only just begun construction on this routine, so I don't have anything helpful to submit as an example.

 

I appreciate any an all suggestions on this!

 

Jay

 

DLL prototype issue for loading PCAP File

$
0
0

Hi everyone,

 

Here is my project :

I want to sniff Zigbee traffic with Wireshark, wich save it as a .pcap file.
I want to read this file to get the desired data.

 

Where I am :

I succeed in sniffing zigbee and generating the file.

I installed Winpcap library and I used the wpcap.dll to open and get SOME information about the file, then close it.

Indeed, when using the function "pcap_next" I can get the wanted data (see joined picture).

 

Where I am having trouble :

Now that I validated that I can open and read data from my file, I want to get SPECIFIC data (frames).

I want to use the "pcap_next_ex" function to get packets data but I can't get any correct result.

 

The prototype of the "pcap_next" function is : 

const u_char* pcap_next(pcap_t *, struct pcap_pkthdr *)

 

The prototype of the "pcap_next_ex" function is : 

int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **) 

 

I tried many prototypes for the second function but none of them worked out (I got 2 numbers as output, look like references...).

The 2 struct used in those functions are the same and the "pcap_next" function is working so I can admit that my clusters are ok.

But I am wondering about how to declare the dll call for the "pcap_next_ex".

My code is joined, I think without winpcap you can't launch it but at least if you could look at the dll call and tell me if my calling method is right.

The file desired file to read is joined to.

The pcap.h file is also joined for the ones who want to look at the description of the structures and the following link explain the functions I am trying to use : https://www.winpcap.org/docs/docs_40_2/html/group__wpcapfunc.html

 

Thank you very much for your help.
Obviously, if you have other method to complete the final task I'm listenning, but for now this is the best I got ^^'


See you soon I hope !

LABVIEW MULTISIM CO SIMULATION

$
0
0

Hi all 

 

I am having two problems with my VI. The first problem is when creating a "control and simulation loop". I tested a simple sine wave as the input stages to my amplifier circuit created on Mulisim but can not simply transmit an advanced signal I have created. 

 

I designed  a process for QPSK transmission but the moment it passes through the loop into the simulation and back onto labview I am getting weird lines. (I will provide an example below).

 

Maybe the settings for simulation parameters are incorrect in terms of timing, I am not sure. On multisim I can transmit a clean 1GHz sine wave but can not configure the settings for 1GHz on labview. 

 

The two files are not incorporating with each other. Is someone able to assist me?

 

Labview VI with unified CAN Send/Receive for "Vector XL Driver" using vxlapi.dll

$
0
0

Did anyone managed to create a functional single Labview VI with unified CAN Send/Receive for "Vector XL Driver" using vxlapi.dll ? Thank you !

Why are there gaps in my waveform graph after peer-to-peer streaming?

$
0
0
I am generating an arbitrary waveform with the PXI-5412 Arbitrary Waveform Generator and reading them with a PXIe-5122 Oscilloscope. I am then streaming the waveform to a PXIe-7846R FPGA module with Peer-to-Peer Streaming and sending the waveform back to the Host through a DMA FIFO. However, when I graph it, there seem to be gaps in the waveform. Any idea what would cause this? I have attached a screenshot of one graph when reading directly from the waveform generator, and one when passing the waveform to and back from the FPGA where the gaps appear.

Ocr string not printing

$
0
0

Hi everyone. I'm trying to create a VI that loads an image and prints the string result. What I have is currently not working when I put the correct training set and image file paths. I've tried including a rectangular ROI wired to the ROI descriptor terminal of the OCR, but even then my result is a dash instead of text. Most online tutorials using OCR to print the string result use a camera to acquire images while I only want to load an image and have it tell me the text on the screen. Testocr.PNG

Breaking up a CAN Frame

$
0
0

I Have a Frame that I am trying to brake up 

The Frame contains an Array containing:  Time stamp, 64 bit pay load, CAN ID, Type and if extended.

I Need to extract just the 64 bit pay load but am not finding a good way to do it.

The 64 bit pay load contains 2 32 bit IEEE 745 floating point numbers.

I am using the example CAN FRAME INPUT STREAM.VI with data coming from a TI. Launch pad.

It is generating all the required data 

I have tried some of the ARRAY icons ARRAY SUBSET etc without any luck.

Anyone got a good idea 

 


Issues with LabVIEW calling .NET DLLs

$
0
0

Hi everybody,

 

My project:

In the lab, we have a LabVIEW system to control motorized stages and other hardware. Now we want to use a sub module to control a spectrometer with its instrument API.dll which is based on .NET framework. So that we can incorporate it into our system. 

 

Where I am:

1. C# codes with API.dll as reference work well on the spectrometer. 

2. I make application .dll using Visual Studio. Build C# solution into class library targeting x86 CPU. So both API.dll and application .dll are 32 bit. 

3. I practice LabVIEW .NET calling .dll embeded with third .dll for mathematical equations or System.IO to play around window files. They all work.

4. I only have poor understanding of .NET and COM. 

 

My issue:

When I use 2016 32 bit LabVIEW to call the application .dll, vi went through without error message, but there's no response from the machine. If I hard code a wrong string in C# codes, then when LabVIEW calling this .dll, the string in C# codes, "throw new Exception(" ")", will pop up in my VI. It looks the C# program was executed to some degree. In the mean time, another lab mate is trying to use LabVIEW directly access API .dll using ActiveX interface.

 

My questions:

For this project, is LabVIEW .NET interface the right way to go? I am really not sure if there's fundamental problem for such a practice. And can I get to know how the codes in my application .dll are executed in this combination?

Since the API.dll won't work without the hardware and license, I don't attach anything here. If VIs and codes are helpful for troubleshooting, please let me know. Thanks!

 

 

 

 

 

Why does it take more elements to view waveform after Peer-to-Peer than there are samples in the original waveform?

$
0
0

I am generating an arbitrary waveform with the PXI-5412 Arbitrary Waveform Generator and reading them with a PXIe-5122 Oscilloscope. I am then streaming the waveform to a PXIe-7846R FPGA module with Peer-to-Peer Streaming and sending the waveform back to the Host through a DMA FIFO. However, for some reason, after going through the FPGA, it takes about 39,000,000 elements to create the entire waveform whereas the waveform when graphing directly from the oscilloscope is 1,048,576 (the correct amount). Does anyone know what is causing this?

Programmatically open build spec properties dialog

$
0
0

Has anyone ever figured out how to programmatically launch the properties dialog for a build spec. I have a tool that shows the build specs from all the open projects. From the tool, you can update change logs and build the exe's or installers (which will be archived). I want to add a button that will open the build spec properties dialog, in case they want to go in and change things like debugging or always included files.

 

Note, I do not want to add all of these functions to my small tool, I'd much rather launch the dialog.

 

I dug around and found an "Open Build" VI in the "NI_AB_API_Build" Class, but I get a "build specification not found" when I try to open my exe build spec with it (double-checked paths and names).

 

Any advice? Thanks in advance!

Running VIs developed on a 32-bit LV PC on a PC with 64-bit LV

$
0
0

Are there likely to be any problems with the above scenario, especially with code that uses mostly VISA functions to control and monitor hardware that is connected through USB ports?

 

I'm developing code on a 32-bit LV system at home that is intended to run on a 64-bit LV laptop at work.  Both computers are running 64-bit Win 10.  The code seems to run fine at home but throws VISA errors at work.  The programs will eventually be compiled once they are proven out.

Why is this FFT not functioning as expected?

$
0
0

I have a PXI-5412 arbitrary waveform generator generating an arbitrary waveform that is read by a PXIe-5122 Oscilloscope. In the picture attached the waveform labeled "1" (in red) is the graph of the waveform as read by the oscilloscope. The waveform labeled "2" is the waveform after being passed through an FFT node on the Host (how it should look). Then I have a PXIe-7846R FPGA module that I am transferring the waveform (pre-FFT) to through Peer-to-Peer streaming and back to the Host and graphing (graph labeled "3") to make sure the initial waveform looks as expected. The graph labeled "4" is the graph of the returned waveform from the FPGA after it is passed through an FFT Node in the Host VI. The graph labeled "5" is the waveform after being returned to the Host where an FFT was performed ON the FPGA instead of on the Host. My question is why the post FFT on FPGA waveform does not look the same as the post FFT on Host waveform (how it should look)?

 

Attached are the waveforms, my Host VI, my FPGA VI, my FFT settings, and the settings for the Peer-to-Peer FIFO and the DMA FIFO for sending and receiving the waveform from the FPGA.

Help understanding timeout feature of event case structure

$
0
0

Hey all,

 

I am trying to continuously sample a COM port, while also sending commands to a group of motors in labview. Currently, I am using the 'Timeout' case event to do the sampling of the COM port. When I have the steps for the motors called out as push buttons. I must click the push buttons to have the motors work in a routine. I ultimately would like to have the sequence of the motors choreographed  and to do this I used a stacked sequence structure inside a case event structure. The problem is after executing the stacked sequence the time out event never occurs. Is there a way to get the sequence functionality as well as the regular sampling that I would get from a short timeout period?

analog start trigger for analog intput task---- pcie-6374

$
0
0

Dear all:

    I have a pcie-6374 board and the board was connected to a SCB-68A I/O box. I 'm upset to runing a analog input task with analog start trigger. The analog trigger signal was generated by a swept source and displayed red line in the oscilloscope, as shown in the picture. A simple analog input task was created by using DAQmx, as seen in attachment. To achieve analog start triggering, I connect the trigger signal to PFI0 connector on the board. In labview, I using "Triggering" and set "start Analoog Edge", the souce was set "/Dev1/PFI0". However, the sampling task does not good runing. How can I start analog input sampling of ai0 on every rising edge of trigger signal?


Access to VeriStand Gateway Status window

$
0
0

Did anyone try to get the content of VeriStand Gateway Status window through VeriStand API or any other way?

I've been trying to find a way to get to that data but no results so far.

 

VeriStandGatewayStatus.PNG

 

I have two goals:

1. Catch an error in deployment and display it in my application - this is my priority.

2. Display progress of deployment as it is happening if I deploy manually from VeriStand project - not necessarily needed but would be good to have.

 

 

 

 

 

Embed VLC into WebVI (NXG)

$
0
0

Hi,

 

I tried to embed a video-stream into my WebVI by inserting following into HTML Source: https://webcast.xxxx.com/xxxx/streamname/playlist.m3u8 (sensored for privacy), but it doesn't seem to work with .m3u8. Previously I managed to embed a .cgi-file. Does anyone have experience with embedding .m3u8? 

 

BR

USB-6212 周波数1Hzのパルスを10個出力させたい

CEF - Extract class information from configuration xml file

$
0
0

So I am trying to understand the Configuration Editor Framework (CEF), and I have been playing around with the hierarchical project template. I don't know if this will fit my needs better than the "normal" configuration editor project, but in the CEF description they mention that most projects would benefit from the hierarchical template
https://forums.ni.com/t5/Example-Code/Configuration-Editor-Framework-CEF/ta-p/3984276?profile.language=en# 

 

I have run the project, added a group and a few channels to the cRIO, given them all on-generic names and property values, and saved it as an xml file. My goal is to extract the information from the xml file in a separate VI in the same project (vi is attached). I am able to open the UI of the root node in the subpanel, and I can see the non-generic System Name in there. But how do I access the information in the main VI? I tried to do some casting to more specific VI, which (obviously) did not work. 

 

What also confuses me a great deal (and it is perhaps a related problem), is the the GetConfiguration methods of all the child classes of the serializable node (group, channel, crio) cast the configuration to a the type of the parent class (see attached screenshot). Why would each class have its own function, when they all do the same as the parent? It seems that it prevents me from accessing the data held by the configuration that is specific to i.e. the crio class (if I i.e. decide to add an IP string to the crio configuration)? 

 

Hope you can help. There does not yet seem to be a lot of documentation on CEF.

LabVIEW Report Generation Error

$
0
0

Hey everyone,

 

I'm trying to learn how to generate an excel report from a template and then re-save that file under a new name but I'm getting an error 1498. Eventually I want to be able to edit this template with data keyed in by the operator and append file cells but let's start with the basics first. Attached is a very basic vi just to demonstrate the error I'm seeing. I've googled the error and tried several basic fixes (Making sure folders not Read-Only, compiling the folder) and nothings worked. It almost seems like there's either a compatibility issue with LabVIEW and Excel. I'm using LabVIEW 2019 32-bit and Excel from Office 16. 

 

I've attached the code and some pictures demonstrating what I am seeing. Any help would be appreciated.

 

Thanks

Viewing all 69005 articles
Browse latest View live


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