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

Problem communicating with a Chroma LCR Meter using VISA

$
0
0

Hi,

 

I cannot communicate with an a Chroma LCR Meter (Model 11021) using VISA yet I can communicate with the instrument using MAX or Realterm via an RS232 serial interface. 

 

When I send the "*IDN?\n" SCPI command to the instrument I get a response in both MAX and Realterm but I'm getting no bytes returned when I create a VI using VISA. I have attached a screenshot of the VI below. I have even inserted a delay between the write VISA function and the Read VISA function but this made no difference.

 

Any help would be much appreciated.

 

Thanks,

Paul

 


How to stop a labview dll function call in C++?

$
0
0

I used labview to generate a dll with a function related to my vi. The vi file includes an infinite loop which can be stopped manually in labview at the top-left (with that red "stop" button). But when I tried to use this function (exported to a dll and called by a C program), the function just stuck.

I did try to start this function at a different thread and kill that thread, but nothing works, the vi loop just keeps running.

I wonder if there is a certain way to stop it.

 

 I called my dll using "lib" file, so I don't have to load (dynamically) the dll in my code.

The generated header file looks like this:

 

#include "extcode.h"
#ifdef __cplusplus
extern "C" {
#endif

/*!
* Kx_4_ZScanning
*/
void __cdecl Kx_4_ZScanning(LVBoolean start, int32_t Laser1, int32_t Laser2,
int32_t Laser3, int32_t Laser4, int32_t k, double IfScanning,
double DCOffsetX, double DCOffsetY, LStrHandle *physicalChannels1,
LStrHandle *physicalChannels2, double frequency, double z_num,
double delta_zX10nm);

MgErr __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);

void __cdecl SetExecuteVIsInPrivateExecutionSystem(Bool32 value);

#ifdef __cplusplus
} // extern "C"
#endif

 

How to block points of an XYGraph

$
0
0

Hi, I am doing a labview program for a project, I use an XYGraph with options to add points, move existing ones and delete them.

I have been trying to limit the elimination of points for a few hours, because I want the start and end points(in this case 0 and 11) cannot be eliminated and remain fixed. At the moment I have not found a way to do it, if someone can help me, I would greatly appreciate it.

I attached my VI.

Wrapped VI issues with LV2012 Source Distributions

$
0
0

Background

I have two LV2012 created Source Distributions (let's call them V1 and V2).  V2 is an update to V1 and includes some additional VIs and some modifications to VIs that were within the V1 distribution.  In particular; distribution V2 includes a modification to PWMR_Initialise.vi (a VI that initialises a USB RF Power Meter).  NOTE: The modification to PWMR_Initialise is internal, we have not modified the Connector Pane.

 

We have 25 sets of identical target hardware (including the Power Meter) and currently we are deploying either distribution V1 or V2 to a target depending on requirements.  Both V1 and V2 are deployed to identical locations, a folder within C:\Users\Public, and as such cannot be deployed together to the same target. 

 

We are creating TestStand Test Sequences on USB Flash drives that we connect to our target hardware and run to drive the instrumentation.  If we call PWMR_Initialise.vi from TestStand using an absolute path to its location in C:\Users\Public the same sequence will run on a target with V1 deployed and on a target with V2 deployed. 

 

Problem

Our problems start when I create a VI on the USB Flash drive that calls PWMR_Initialise.vi (a wrapper around PWMR_Initialise) and call that from our TestStand sequence instead of calling PWMR_Initialise directly.  If I do that I get two distinct behaviours.   

 

  1. If the USB Flash drive wrapper VI is created on a development machine with VIs at the V1 standard the TestStand sequence will only run on target hardware with V1 Source Distribution deployed.  If I attempt to run it on a target with V2 Source Distribution deployed TestStand returns a VI Not Executable error.
  2. If the USB Flash drive wrapper VI is created on a development machine with VIs at the V2 standard the TestStand sequence will only run on target hardware with V2 Source Distribution deployed.  If I attempt to run it on a target with V1 Source Distribution deployed TestStand returns a VI Not Executable error.

The problems are introduced when the wrapper VI on the USB drive is introduced.  It feels like as we introduce a wrapper VI we introduce something that sees the differences between the V1 and V2 versions of PWMR_initialise.vi that are not seen when we call PWMR_Initialise directly from TestStand (without a wrapper).

 

Any thoughts, suggestions, random ramblings greatly appreciated.

 

Steve

rolling 2D array with a max size

$
0
0

HI,

 

I have some equipment that continuously spits out data at 100Hz, it is 24bit ADC values across 32 channels.  This needs to be shown on a graph with a button to click to capture some of the data and perform some statistics.  The spec given to me  says i need to collect 64 data samples and then perform calculations on them. I  can feed the raw data straight to a graph that is fine but i don't want to continuously filling up an array with this data as i guess it wont take long before the memory if affected.  So i was thinking of using a rolling array with a max size of 64 rows by 32 columns, the first 64 loops will be filling the array up.  After that it will delete the first row and add the next sample of data to the end, this way the array never grows.  i thought this should be a simple task but i am really struggling to get it work.  i have created an example of what want to do with a 1D array. just need to change it to a 2D?

 

does anyone know how to do this? or suggest a simpler way, i may have just chosen the wrong method.

Regards        

Executable with Activex controller does not fetch the data when run on another machine

$
0
0

Hello Team, I am building an application using ‘TrioPC’ active controller to connect to Trio Motion Controller. I have created an executable using application builder and trying to run it on another application where I have installed the setup which was build through ‘Application Builder’.

 

Issue – Exe does open but connection does not gets open and does not read values from Trio Controller on new machine. But when I run same exe in my machine (on which i have developer edition is installed), it opens up the connection and retrieves the data from controller. Executable runs successfully on my machine but not on different machine.

 

Please help me guide if I am missing anything while building executable. Or anything else I need to take care of. LV version I am using is – LV17.

Re: Close SubVI Front Panel

$
0
0

Even I have one question

I am calling subvi for input (it is purely for UI purpose) in the main vi, here what happens is subvi is called properly but then I have to click on the String control to type the input. I wanted to type the input as soon as sub vi appears with needing to click the control 

thanks and regards 

Baig

FPGA DDS RF signal generation using an NI 5783 Adapter Module with NI 7972R FPGA

$
0
0

Hi!

 

I am trying to generate DDS RF signals using an NI 5783 Adapter Module with an NI 7972R FPGA. Could someone provide me with a working example or something similar?


Not able to find error in DD VIs...

$
0
0

I get "strange" errors when changing dynamic dispatch VIs in classes. I change DD VI terminal layouts or something like that. I correct all VIs of the set of this DD VIs. All VIs in the set have the same terminal layout, same terminal types. All VIs in the set have the same execution (and other) settings. No one VI in the set is broken. However I still get this error:

 

"One or more of the set of VIs which this dynamic dispatch subVI or property item may call are broken."

 

This makes me really mad. Why LV isn't able to show EXACTLY where is the problem ???
Does anybody experienced similar behaviour? Where else can I look for the error/problem? :-(

 

FIFO - slow write/ fast read, Problem?

$
0
0

Hello everyone,

I have two questions about FIFO in LabVIEW FPGA. When the clock of FIFO writing side(70Mhz) is slower than the clock of reading side(80Mhz), then the reading side will indicate Timeout signal. But I can still read out data continuously.

My questions:

Is there data loss in reading side?

Or even if there is a timeout signal, the reading side will still wait writing side until data is readable?

Thanks

loop to array in a loop for multiple arrays

$
0
0

Goal:

Input data (x,y) and plot bar graph.Then take this data and make a Gaussian array for each X position with intensity Y. Sum Gaussians to make a single array of the sum of Gaussians.

 

Thoughts. Make X data array. Put that through a loop to get a Gaussian. Need help to summing Gaussians.

 

Thanks for any help!,

JK

Motion and Measurement with User Input Example Search

$
0
0

Hi All,

 

I'm looking for examples of similar projects to the one i'm working on.  Basically I want LabVIEW to perform a simple stage move and then release a latch while measuring displacement from a displacement sensor.  Specifically, i'd like to set the parameters of the stage move, and allow a user to command the latch release.

 

I have a Newport XPS-D8 motion controller (using .NET LabVIEW controls), a Keyence laser displacement sensor, and an NI cDAQ controlling latch opening with a 10 V signal.  I have the VI's to run each piece of equipment on their own, but i need to put them all together.  From my searching, it looks like a Queued Message Handler, or a State Machine example would work, but i'm having trouble finding an example that would be specific enough to help me.

Smart plugs controlled by LabVIEW?

$
0
0

Can anyone recommend a smart plug that LabVIEW can talk to? Either over a wired or wireless network. 

 

 

Thanks

Graham 

cDAQ speed improvement

$
0
0

Hello,

 

This is my first post at the forum and maybe someone can help me.

I am switching some output-pins on a cDAQ based system with USB connection to my PC

Just switching on 1 output take about 35 ms but compared to the speed of the USB-interface this seems to be very long. I am using a cDAQ system which has a USB 2.0 interface which has a transfer-rate of 480 Mbps.

Can somebody explain why this should take so long and if there are possibilities to improve this?

I have attached my test-program.

 

Best regards,

 

Wamor

 

DAQmx Generate a modified TTL

$
0
0

Hi, I am trying to generate a continuous TTL triggered by a input TTL similar as in the figure:

 Capture.PNG

with a PCIe 6321 and a BNC2110. The frequency of the input TTL is around 100KHz. Do you have a good way to approach this problem? One approach that I tried is to output an analog signal when the DAQ counter is odd (with a case structure of 1 if loop# mod 2) but there is a software lag time. I am thinking what I need to do is something along the line of this but I am not sure how to do it in parallel with the AO writing for every odd counter loop. I dont have access to a chassis unfortunately.

Thank you very much for your help.


How to seperate 2 signals whose frequency are close

$
0
0

Hello everyone, 

 

Now my system has inputs of two sinusoidal signals combined whose frequency are close to each other and amplitude are same, one is 100KHz, the other is 100K +10 Hz.

 

I need to calculate the signal phase using Cordic in NI 7972 FPGA module, either 100K or 100K+10Hz. My plan is to filter out 100K+10Hz, and measure 100KHz. But I was wondering if the filter in FPGA can do that precisely and fast. I need the feedback to be MHz level. 

 

So guys, please advice me. 

 

Thanks

Initialize myRIO with LINX.

$
0
0

Hi, everyone!

I'm trying to make a myRIO project using LINX for the code. My problem is that I don't know how to 

read or initialize the device using LINX.

If you can explain to me how can I do it, or show me a VI example where you use the LINX code with myRIO, I'd be grateful.

Thanks advance!

Use the Partial Differential Equations VIs to define and solve a 1-dimensional heat equation in a rectangu

$
0
0

Good moring Master!

I want use Partial Differential Equations VIs to define and solve a 1-dimensional heat equation in a rectangular domain.

At "Define boundary condition" , I don't know how to declare functions. Cotg (a) = a/ b

The program is reporting an error and does not produce results

Can you help me?

Thank you so much!

Labview 2015 - NI 9185 DAQ Assistant Physical Channels

$
0
0

Hello, 

 

I have a LabVIEW 2015 with which I am using DAQ Assistant (DAQMX 18.6) in the block diagram of my VI.

 

However, when trying to use the DAQ assistant to create a task to Acquire Signals -  after selecting the type of measurement, in this case Voltage,  I get a message that says no supported devices are found, even though MAX says my NI CDAQ 9185 is connected and running.

 

Essentially, my LabVIEW program is saying there are no physical channels to be found, if I'm understanding this correctly.

 

See pictures attached and if anyone could please help, I would greatly appreciate it.

Thanks! 

-Al 

Image tracking

$
0
0

Hey Guys, 

 

So I am working on a project to locate the position of fish in a tank and choose from an array of sensors to fire. My plan is capture the image of the tank just with water without the fish, convert it into an array of pixels and repeat that same process this time with fish continuously after which I will do array subtraction to tell non- zero pixels as position of fish. In addition to this, we are supposed to take a live stream video of the fish as well as well as store the video. We have a managed to have a working video capturing and storing VI, however, the challenge is to take that first image of the tank without the fish. I tried to use a switch and either select function or case structure to choose between taking just one single picture as baseline but I couldn't seem to work that out correctly, would there be an easier way to do this? Help. I have attached the VI we have now.

Viewing all 69009 articles
Browse latest View live


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