Quantcast
Viewing all 202581 articles
Browse latest View live

Re: Estimate Transfer Function - Step Response


Re: NI USB 8452 excessively long program execution time


 wrote:

I am not using references nor property nodes. Only direct wire or local variable, because they are faster.


I was actually referring to the reference to the 8452.

 


 wrote:

Unfortunately, I cannot show the code (it's my employer's property) :/


Then make a small example that is showing the issue.

 


 wrote:

PS. I'm also a fan of Monty Python and the Knights of NI Image may be NSFW.
Clik here to view.
Smiley Very Happy


Knight of NI is actually a community ranking for those who manage to rack up 10k posts.  Though, the term was created by Dennis (the original knight) who was a HUGE Monty Python fan.

Linx and Baud Rate

Hello, 

 

I have connected an accelerometer (adxl345) to arduino mega and I read successfully values with labview and linx via i2c protocol. 

Right now I have a sampling rate of 65hz with 115200 baud rate. I want to maximize the sampling frequency,but the baud rate seems to be unable to go any higher of 115200. 

Is there another way to do this without changing my communication protocol (i2c)?

 

thank you in advance 

Re: File overwrite


 wrote:

I wanted to use just the TRUE part of that CASE, but if I don't wire something in the FALSE part for the output then the "RUN" button will be broken. Do you know what should I do in these cases?

Image may be NSFW.
Clik here to view.
kerdes.PNG
 


Just wire the reference through.

Re: File overwrite

A couple of additional points:

  • The Principle of Data Flow means that the While Loop won't run (again) until everything inside the Loop has run.  This means that which takes the longest time determines the Loop speed.  The minimum loop time is 50 ms.  If either optical sensor "fires", the minimum increases to 300 ms.  And depending on the sampling speed/timing of the Ai/AO functions and any processing relevant to those samples, the minimum time might be even longer.
  • Time is an important concept in LabVIEW, and in DAQ, in general.  Having a loop with uncertain and "variable" time is often a Bad Idea (the exception is when you want to run "as fast as possible", i.e. without any Wait or DAQ functions).
  • Many LabVIEW functions have Error In and Error Out lines.  In addition to the important function of spotting Run Time Errors, they also define the "order" for function execution.  In particular, a function that is not on an Error Line (like the Wait functions) can execute any time in the loop.
  • The I/O line in the AO False Loop that comes in on the left just gets "wired through" and brought out on the right.  This line "defines" the DAQmx Task, and is usually carried in a Shift Register (so that it "has the latest state").
  • You might want to sit down with Pencil and Paper and think "What do I really want to do?".  It occurs to me that you might have two independent Tasks (and maybe more than two ...). 
    • One is to monitor two sensors that record Laps and figure out when one (or both) reach 10 laps.  This is a simple task, one that should have a single timing that defines the timing resolution you need.  I think I know why you have two timings -- you are looking at levels, i.e. T or F, and don't want to measure two Trues in a row (because your pulse is high while you make two successive measurements).  Can you think of a better way to know that this is the first T measurement?  [Hint -- learn about Shift Registers and While Loops].
    • There may be a Task to output something to a Measurement file.  When should this start?  How often should it take place?  For how long?  Why are you doing this?  What is being measured?
    • You may want to do something with these data.  What?  When?  Why?
    • It's especially important to ask how these varying sub-Tasks relate to each other.  Does one depend on the other?  Must they run at the same rate at the same time?  Note that because of the Principle of Data Flow, LabVIEW can easily have two Tasks run at the same time, but independently of each other (this is often called "Parallel Processing").

Bob Schor

Re: NI VirtualBench-8054 and its Labview Programming


 wrote:

When I followed the "QUICK START GUIDE" of this VB-8054. it always show me an error window with error code -375934. Is anybody know what I need to do to fix this problems?


Crosspost: error with error code -375934

 


 wrote:

Another question is that I am going to use this VB-8054 to output 5-bit logic output through its DIO output. These output has to be dynamically updated every 10 uSec


On a Windows machine, not going to happen.  On a RealTime system, perhaps.  But that won't work with the VirtualBench.

If this is a school project, then I recommend looking at the myRIO.  You can program the RealTime to control your DIO.  Or, what I would do, program the FPGA on it to manage your DIO (getting into the 25ns resolution with little jitter).

Issue with sending TXT file through serial communication (UART)

Hi LabView community,

 

I have been working on making a test software for an embedded software in a circuit board. It's UART communication between my PC (LabView test software) and the board (embedded software). Here is one example showing how it works. If I send a char H to the board, it replies back to me with temperature and humidity reading from sensors on the board.

 

Couple weeks ago, I faced to an issue sending the whole TXT file to the board. What I have implemented is reading the TXT file line by line and it converted to an array of string. Each element of the array of string, which is each line of TXT file, goes into the VISA WRITE as inputs. 

 

The total number of lines in the TXT file is 6083, and the format is like:

@0000 (memory address)

(machine code in HEX)

@0040

(machine code in HEX)

@16xxx

(machine code in HEX)

@17xxx

(machine code in HEX)

q

 

The q is the termination character of the data receiving for the embedded software. As soon as the embedded software in the circuit board gets the termination character, q, it stops receiving and send an acknowledgement message saying the download was successful. 

 

My problem is not getting to the point. It seems like the embedded software does not get the q from my LabView software.  

 

One thing I have found is if I delete the code,

@16xxx

(machine code in HEX)

@17xxx

(machine code in HEX) 

 

and then extend the code of 

@0040

(machine code in HEX)

 

up to 6083 (same size as before), it works fine. 

 

Or if I shorten the length of the overall file like:

@0000 (memory address)

(SHORTEN machine code in HEX)

@0040

(SHORTEN machine code in HEX)

@16xxx

(SHORTEN machine code in HEX)

@17xxx

(SHORTEN machine code in HEX)

q

 

it works fine (it's about 500 lines).

 

I thought it might be the buffer size issue, so I made the transmit and receive buffer in LabView as 1MB for each. Still does not fix the problem. 

 

Any of you had a similar issue? Any recommendation is welcomed as well.

I would much appreciate your advice.

 

Thank you.

Re: LV error on Windows 7 with NI Gmath VI

Try "Disconnect Type Defs" in the build spec.   There is a nasty Strictly Typed VI Ref ctl

C:\Program Files (x86)\National Instruments\LabVIEW 2018\vi.lib\gmath\NumericalOptimization\LM model function reference.ctl

that is used to call av vi by ref down it the bowels of 

C:\Program Files (x86)\National Instruments\LabVIEW 2018\vi.lib\gmath\NumericalOptimization\Constrained Nonlinear Curve Fit.vi

Which IS a polymorphic VI that adapts to type.

 

Try also finding where you call that and show the poly selector and select your instance then check remove unused polys in the build


About Reading data and save data

How I can read Signal data from One file and apply filter with each Imaging plot and finally save format into current file?

problem in running .wave music file

hello Everyone,

I'm New to the LabVIEW and I just started my New Job. I'm working on the LabVIEW Project in which the Vi should play the .wav music file to NI DAQ card card which is of 10hrs and display the Time, the music starts playing but don't know what happen when I come and see my pc the Time display will be Randomly changing value. please any one of u can lead me to know better solution 

Thanks in advance

Gowtham.R

Excel OLE Error when accessing Excel through LabVIEW

Hi All

 

I have an application wherein I am searching through large number of excel files names (in hundreds) . If the excel file name matches with Pattern provided, I am opening the excel , reading few columns from it and then closing the excel. The pattern which I am providing to look into excel file has upto 1500 permutations.

So in short , I am taking each pattern at one time , checking its availability in hundreds of excel file names and if it is present , I am opening excel, reading stuff and then closing excel.

This works good for some time , however After some time , when my LV application is running I am getting below error popup :

"Microsoft Excel is waiting for another application to complete an OLE action." This popup continues to come at very fast rate and remains there even if I exit LabVIEW.

 

If I am opening normal Excel file(and not through LaBVIEW) this issue is not observed.

I am attaching VI over here which I am using for reading excel.

Search a String within another string

Hi All

I have an application wherein I am trying to search StrA in StrB where StrA can be greater in length than StrB.

For Eg: StrA: Hot Bucket water spills.

StrB: New bucket

 

So I need to check if StrA any part is present in StrB. If the match is found then I will be doing further processing logic . I have checked with match pattern , regular expression, search/split functions , however not getting the expected output since StrA and StrB values can vary a lot. Also converting string to Array and then compare is not an option since these processing is only a initial part of application and needs much processing later.

I would like to implement a function which should be able to check if string one part is present in another string, then match should be found. 

 

10 G communication and LabVIEW

I have gotten a last minute assignment of the highest priority that is centered on writing and  reading messages sent over a 10 GB Ethernet connection. Will LabView's TCP drivers support this or will I have to develop read and write processes using the LabView Network Streams vi's to handle the task. A prompt reply would be greatly appreciated. I'm currently developing in LV 2014 but can upgrade to LV 2016 if necessary.

Thank you for any help.

 

Josh

Re: Search a String within another string

Match pattern is the faster string search. You can do as you said put it in a array and then in a for loop do the search. the for loop can execute in parallel multiple search and then you will have an array of Boolean or what ever you want as output. Then do the rest of the processing depending of the results.

Benoit

Re: problem in running .wave music file

Please clean your code. I am to lazy to spend hours debugging something that looks like spaghetti without sauce.

Benoit


Re: About Reading data and save data

Heeee... what?

Give more information on what you really want to do.

What file format are you talking about and what do you want to do with the graph data.

Benoit

Re: 10 G communication and LabVIEW

By my experience it should work... but create your application multi-tread.

Benoit

Re: problem in running .wave music file

thank you for looking in to my Question, in the code  its like first I'm extracting the .wav file and its num of samples after that I'm multiplying its amplitude by 3 and  enqueing it and dequeing it through 5 different channels(in simple way getting music from 5 outputs) through 

NI PCI Based Card PCI-6221 Part Number-779066-01. 

Re: How to call dll function with the double asterix parameter

Can I please ask you for some additional information : Why void ** ppHandle should be of a Data Type: Unsigned Pointer-sized Integer? And if I would have only one asterisk like this: void * pHandle should I also use Unsigned Pointer-sized Integer for data type?

Re: About Reading data and save data

The attached file is the format of Data File. My work is (i) Read Signal data (in attach file where Y1.....Yn) from this format of file (attached file).

This Y1,Y2........ Yn are actually THz amplitude data which we can get from Optical to Electrical signal conversion through A/D converter and Lock -in-Amplifier...  I need to make array of this series of data.. X-axis and Y-axis actually indicate the positions of laser pointer in two-dimensional axes, with position changing the value changing (Indicate in the attach file like 0,1,2,3 for axis , value for Y-axis 0,0,0,0 respectively like this way) ..

 

to -initial time and dt- time Interval for each position changing (Attach file)...

 

 

My second work is (ii) After reading data of said format of file, apply Low-pass filter (Which I attached in the first question) with each Imaging Plot (with each position of laser pointer changing, each Imaging is established)..

 

And my final task is (iii) Save the said format of file into the current file..

 

 

How I can do this in LAbview.. Thank you for your so quick reply 

Viewing all 202581 articles
Browse latest View live


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