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

How can I read of period of a frequency signal with NI 9421?

$
0
0

Hello Everybody,

I am working with NI 9421 that is connected on CompactRIO 9035. I am reading a digital signal of proximity sensor. I want to read of period between two pulses. I want to know rpm of a wheel. I attached the program what I did it. 

I try to read of period with tick time but I have really problems speed of the loop because if the loop is too faster I don´t read very well. I am using ScaneEngine. I made this program because if I configure the NI 9421 like period measurement changes all the input and I need other inputs of this module to read other signals.

Thank you so much.

Any suggestion it will very helpful 

A regard 

Pedro

A


Impersonation Level problem using .NET calls

$
0
0

I am trying to connect to Zemax OpticStudio API using their .NET interface. Identical .NET calls from C# work, but they fail from LabVIEW.

 

I get the following error as I try to open a connection from LabVIEW:

 

Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.Runtime.Remoting.RemotingException: An error occurred while processing the request on the server: System.Security.SecurityException: Cannot open an anonymous level security token.

at System.Security.Principal.WindowsIdentity.GetCurrentInternal(TokenAccessLevels desiredAccess, Boolean threadOnly)
at System.Security.Principal.WindowsIdentity.GetCurrent()
at System.Runtime.Remoting.Channels.Ipc.IpcServerTransportSink.ServiceRequest(Object state)
The Zone of the assembly that failed was:
MyComputer <append><b>System.Runtime.Remoting.RemotingException</b> in ZOS-API test.vi

 

The connection is denied because impersonation is at a level of anonymous.

 

Default DCOM settings for the computer were already at Authentication: Connect and Impersonation: Identify. For some reason LabVIEW (or some part of LabVIEW that is involved in .NET calls) is trying to connect using a lower authentication level than default.

 

How would I go about setting the impersonation level from anonymous to identify?

Save data in new column for each pause trigger pulse

$
0
0

Hello,

I am using DAQmx for data acquisition on Windows 10.

I know how to make a 2D array to store two different data let say (x,y). But how about having 1000D array or more ? In my experiment I am using pause trigger to collect signal for certain wavelenght range. The trigger starts with every laser scan pulse ( laser runs in sweep mode controled witth an external software. I am making N laser scans for the same wavelenght range. I will have N pause trigger though). For every pause trigger I want to collect the output data (100000 samples) into a new column. At the end of the N scans I must  have an array with N columns (Y axis). For the moment all recorded data  are in one column. The idea behind having the data stored into different columns is to make an average over N scans. Hope I am more clear now. Any idea ?  Enclose the simplified version vi. Thank you 

NI-488: Nonexistent GPIB interface.

$
0
0

Hi,

 

I am new to LabVIEW . I have installed a 2016 version of LabVIEW and tried to launch my programm and got the following error:

Error 7 occurred at Open File+.viSmiley Surprisedpen File

Possible reason(s):

LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
=========================
NI-488: Nonexistent GPIB interface.

 

I should note that my computer is not connected to any data aquisition system.

May be that is what causing the error or maybe there is a different problem?

 

My program's inputs are: temperature (thermocouple) and displacement (LVDT). Should I configure them somehow in the MAX?

 

Thank you in advance.

Communication over TPC/IP without using VISA drivers?

$
0
0

Im trying to communicate with a RIGOL DG4162. 

Using the visa library and the instruments divers works and it's fairly simple.

 

Im trying to  connect without this resources, over a simple TCP connection and be able to send the SCPI commands to the instrument. I need to do this becouse we will later need to implement the communication in a siemens PLC (PLC to RIGOL communication) in wich i cannot install VISA drivers...

 

Im able to open the TCP connection with the instrument using port 5555 and the instrument IP adress, but writing the same commands wich work with the VISA driver, using the TCP Write function won't work. Any help would be apreciated.

 

Interfacing labview with keithley source meter

$
0
0

Hello All,

I am using Keithley 2450 SMU for performing a simple potentiometry. I have an electrode with three terminals Working electrode(WE), Reference Electrode (RE) and Counter electrode (CE). My application is to supply 200mV , 1 Amp across WE and CE, at the same time, I need to measure the Voltage across the WE and RE. I have used the LabVIEW drivers availabe at NI website. I have the following queries.

 

1) Which measuement option I need to use for the above applicaton,  2 wire mode or 4 wire mode

2) I have tried 2 wire mode and found that, what ever source voltage we are providing across the electrodes (WE and CE), I am getting the same from the Source meter measurement panel.Same from LabVIEW code also. For eg, if I give 200mV I am getting same 200mV across the RE and WE. But when I measure the voltage across (WE and RE) using a multimeter, I am getting around 155mV. Why it is not showing in Source meter?Why SMU is not showing the voltage drop across the RE and WE?

3) Then, I tried with 4 wire mode (200mV ,1 Amp) and I am getting 200mV across WE and CE and same across WE and RE. But when I measure the voltage across WE and CE using multimeter, I am getting 320mV and across WE and RE I am getting 200mV. I think in 4 wire mode the SMU is compensating the drop across the WE and RE and it is trying to maintain 200mV across it.But I dont want this behaviour. I need the voltage (the dropped voltage) across the WE and RE.

I am attaching the connection diagram of SMU with the electrode.

Expecting your suggestions and inputs

 

Thanks

 

TDM/TDMS Excel plugin doesn't work using System Exec.vi

$
0
0

I downloaded the TDM/TDMS Excel plugin.  I can launch Excel and click on a TDMS file and the conversion works.  When I run the example 'Command Line Execution.vi' using the 'Interactive Applications' tab, Excel launches, but the TDMS plugin doesn't work.  A file gets loaded into Excel but it's all non-readable.  I have the following in the command line: C:\Program Files (x86)\Microsoft Office\Office14\Excel.exe C:\Scratch\filename.tdms.  Do I need a switch in the command line to call the plugin?  Thanks in advance.

Generating "Series" of Case Statements to Manipulate Waveform

$
0
0

Hi All,

 

I'm trying to find a way generate an 'unknown' number series of case statements, the number of which will be determined at program start (the minimum number of which is zero, and the maximum number is not known). Assuming we are given the required number of case statements as an integer n, I would like to do the following:

 

1) A waveform signal feeds either: the first case statement (if there is more than one or more), or the waveform chart if the number of case statements is zero.

2) If another case statement is required, create it and feed in the output from the previous case statement. If there are no more case statements requried, feed the output from the last case statement to the waveform chart.

3) Repeat 2 until there are no more case statements required (# of case statements = n)

 

A simplified visual representation of what I am talking about for two cases is in the following image:

(For those wondering: The command values will be read from an array of size n.)

Loop Example Visual.png

I realize the system will not be visible this way. I'm just hoping there is way to generate this system using a loop.

 

Any help is greatly appreciated. Please let me know if you have an idea but need clarification.

 

Regards,
Stefan


Write to measurement file VI slow down acquisition speed with enqueue dequeue

$
0
0

Hello everybody,

 

I'm doing some stuff relate to write the data to file. At first, I use the Write to measurement file VI, placed it inside the while loop but I realized it slow down the acquisition speed. Then I tried the enqueue dequeue followed by Labview's example.

When I test with enqueue speed and dequeue speed same are 100ms. It worked fine, not slow down the acquisition speed at all.Block Diagram_100ms.PNGFront Panel_100ms.PNG

Then, I changed the enqueue speed and dequeue speed same into 5ms. The result wasn't like what I expect. The elements in Queue increase quite rapidly and the data in 2nd loop (dequeue) is slower. (if I dont use the write to measurement file VI, 5ms is still ok)

Front Panel_5ms.PNG

So, is there any way to remain the acquisition speed or was I wrong somewhere?

Please help me to get rid of this stuff. This is very urgent

Thank all of you.

PCI-6341 Analog Output Rolling Buffer

$
0
0

At present I'm using the PCI-6341 Analog Output to control the driver of an external piece of kit.

I preload the FIFO with up to 8191 values, then clock them out via a hardware TTL signal.

In future I would like to use more than 8191 values per experiment, is there a way to implement a rolling buffer?

The process is relatively slow, I clock out the values as 2 or 3 kHz.

 

initialise_AnalogOutputFIFO.jpg

wrong Mbed read

$
0
0

Hi everyone, 

 

I have an issue trying to read what I send to my FRDM_KL25Z (mbed target) 

I generate a stream bit that I send to my target and then I tell my target to resend to computer what it received. And the result is not as expected.

The generated stream bit is coded in U32 and contains several fields of bits. Maybe a better solution would be to send each field separatly and handle them into the target but I don't know how to do it because I don't know how are sent data and how handle them into board...

 

I joined my VI and my C++ code. In the code, handling of reception can be found in in first lines of the function rcvAndConv().

 

Thank you for your help ! 

Simultaneous analog input and output

$
0
0

Hi all,

 

I have a cDAQ-9178, with modules NI 9263 and NI 9205. I am trying to read a variable waveform (from a hall effect sensor), do some basic filtering or alterations, and then output that new waveform as fast as physically possible. 

 

I need some help to determine if a) This is possible b) How to do it.

 

I have attatched my VI snippet (relatively new to Labview and these forums so let me know if I did something wrong). I have tried a few dozen alterations to it, and since Im self taught I'm sure there are some glaring mistakes, but I really need help getting this to work at the same time.

Cos look up table and FPGA

$
0
0

Hello,

I have two sets of data that need to be converted to cosine wave with a cos lookup table. To save memory, I used two case structures to differentiate two inputs and outputs, but somehow the FPGA only outputs the first cosine wave regardless of the condition. I wonder if anyone can help me solve this problem.

Thanks! 

Delay LabVIEW FPGA, between producing an output using a c9263 and reading it back using a c9239

$
0
0

I'm working on an application which requires the output produced by a c9263 to be read back by a c9239 for confirmation.  The c9239 is configured to run at 50 kS/s and while I expect to see a small delay between when the output is set and when the confirmation input shows that output change, right now it's about 850 microseconds which seems far longer than I'd expect.  Is this a reasonable delay or does it sound like there is a code issue.  Here is a screen shot of the relevant code for reference.  Thanks.

 

 

Capture.PNG

How to programatically save an Excel file

$
0
0

I have been able to successfully open a tdms file in Excel using the tdms plug-in.  Now comes the question: how do I programatically save an Excel file?


Bug in Get Image Method on Control

$
0
0

I'm using the Get Image method on a control reference to generate a graph that goes into a PDF report.  I noticed for some reason the grid lines on my graph were on top of my plots which I thought was odd but I didn't really care because you could still follow the trend.  Unfortunatly our equipment is getting quite precise on the measurements and the scale zooms out enough that our plot line might only be a couple of pixels in size, and the grid line has a chance to cover up the data.  After looking into it a bit the reason for this seems to be that the Get Image method behaves differently if it is taken from a graph that is in a front panel that is open, or if it is closed.  Here is an example:

 

Untitled.png

In this simulated data it isn't as big of a deal, but as I said if my actual data was -1.4 the whole time, it might be hidden by the grid line.  Attached is an example which behaves the same way in 2015 SP1 32-bit and 2016 32-bit on Windows 7 x64.

 

Is there any suggestions?  Work arounds?  Can I get a CAR?  By the way this control comes fromt he Missing System 2.0 controls.  Thanks.

 

Edit:  Okay so it seems replacing the graph with a silver graph, makes the issue go away.  I just then need to change the silver graph to look like the system one.

Urgent: convert small VI from 10.0 to 8.5

$
0
0

Hello,

I need a small VI that a coworker saved in LabVIEW version 10.0 to be converted to 8.5 because I need to see it and I only have 8.5. He is in a different time zone and has left the office for the day. I was wondering if someone could do me that favor. Since this forum does not seem to accept attachments, I have placed the VI at this location: https://1drv.ms/u/s!ArzUs4eWqqMeg3MqfhwmG2HERpCT This is on my OneDrive; you could email the downgraded version to: kameng(at)sakor(dot)com. I figured out how to attach, so the VI is now attached to this post. I guess, you could attach the downgraded version to your post. Thank you in advance!

Kamen

Paralellize TDMS Read/Advanced vs. Regular TDMS read time

$
0
0

Hello,

 

I am running an analysis on very large data sets (>100MB) and need to achieve some fairly drastic (hopefully 10x) performance improvements. The bulk of the code is within a single while loop where the TDMS Read function is called iteratively (w/ set read size and moving offset) extracting 2 channels of data. These two channels are fed to a subroutine which, essentially, calculates the cross-correlation. The resulting cross-correlation is then added to the previous cross-correlation compuation and stored into a shift register until the file reading is complete. 

 

After profiling the code I've realized that most of the time is spent reading out data via the TDMS Read function. I am hoping that it is now possible to parallelize the code by splitting the data into 4 different subsections (e.g. http://www.ni.com/white-paper/6421/en/). However, I don't know if this works since we have a single reference to the TDMS file. It seems this wasn't possible a few years back but had some active development in this direction. If necessary, I imagine I could break the data into smaller TDMS files but it would be much nicer to work with a single file.

 

Also,  I was curious if I should expect a difference in read times using the advanced vs. regular TDMS functions. I initially switched from advanced tdms to regular tdms reads so I could select individual channels without having to unpack all of the data. In contrast to my expectation, I got a reduction in my performance.. is this expected?

 

Thanks for any help, and please let me know if any clarification is needed.  

Maxon data recording with EPOS2 70/10

$
0
0

Good Afternoon everyone,

 

I've just started working with labview in order to control a 70/10 controller while reading transducer data from a NIDAQ.

My goal is to read position and current data from the controller and sync it with the NIDAQ data through labview.

I'm able to read from the DAQ no problem, but the controller has a limited buffer size, so it only gives me 0.1s of data before it runs out. Is there a way to bypass the buffer and stream position and current straight back to labview? Or will I have to send multiple packets of data over time (and if so, how would i do this?).

 

Thanks

Implementing CCC: CVT Client Communication

$
0
0

Greetings

 

I am currently involved in a high channel count industrial application development. The CCC seems to be a good method to transfer data for a large number of variables between a UI on a PC and the RT cRIO host. The example (http://forums.ni.com/t5/Reference-Design-Portal/CVT-Client-Communication-CCC-Library/ta-p/3538590 for using CCC) is the only example I could find. It creates one CCC client instance in Client Init.vi, then simply uses Client Synchronise Data.vi to refresh the data in the CVTs.

 

I have some variables that only change very occasionally. It is a burden on resource to continuously synchronise everything at a high refresh rate that is only required for a small data subset. Does anyone know if I could create more than one CCC client instance to deal with different synchronisation rates? If yes, how to implement it.

 

I have tried and failed using an event structure to trigger a refresh of some of the variables. I also failed to branch out two loops using different Client Init.vi (not knowing if it is a re-entrant vi).

 

Can anyone help please? Thanks.

Viewing all 68958 articles
Browse latest View live