Quantcast
Channel: All LabVIEW posts
Viewing all 202507 articles
Browse latest View live

Re: Best PING, one that understands "TTL expired in transit"?

$
0
0

Of course, parsing the text output of a command line tool is always tricky as that output can and often is dependent on OS version, and definitely currently selected language setting. That's in the nature of the beast.

 

The alternative is to directly interface to the OS API. Problem here is that this is very dependant on OS and OS version.

 

Since Windows 2000 there exists some preinstalled ping service but the API to it was completely undocumented until Windows 7.

https://docs.microsoft.com/en-us/windows/desktop/api/icmpapi/nf-icmpapi-icmpsendecho

This is the WinAPI for that service. While it can be accessed with the LabVIEW Call Library Node, it is non-trivial to do so. For the faint hearted using some .Net nodes is probably the much easier alternative.

 

The alternative was to use raw sockets to create your own ping handler directly on top of IP frames, but the bad thing about this is that raw sockets are only available for priviliged processes, meaning they either need administrator rights together with being elevated since Windows Vista or a Policy change in the registry to allow raw socket access, which you only want to give to very specific processes as otherwise every virus can run havoc with your machine.


MyRio 1900 + ADS1115 (i2c)

$
0
0

I got myself an MyRio-1900 today and was wondering of somebody can help me with reading data from an i2c device.

Adafruit ADS1115, 16-bit ADC. The address of the unit is 0x49.

 

I have only tryed it on arduino devices and not in Labview before.

 

http://www.ti.com/product/ADS1115/technicaldocuments

 

I want to do this:

  1. Sett unit for DIFF readings (AI0 + AI1, AI2 + AI3)
  2. PGA = 1
  3. Speed to 64SPS
  4. Mode = Singel-Shot

 

Re: Width of Hysteresis

$
0
0

Hi Hossein,

 

Thanks for your reply.

 

1-The minimum and the maximum allowable of width. For example we say if the width is going to be bigger than x1 it's proper to compute and show the value and if it is going to be smaller than x2 then it's not proper. It's a reasonable to have an interval for allowable values, without this you don't define anything to compute. Imagine I am just a programmer and I don't have the knowledge of your test and I don't know what is hysteresis but I can implement your goal by programming, this is the reason of asking this interval.

There is no min allowable value as in  my case, hysteresis width = 0 will be a perfect situation. Max. is  9.

 

I have attached project to this message.

 

Thanks,

Gregorian7

 

can not run cDAQ9188XT

$
0
0

Hello,

after installing NI-daqmx 18.5, i am not able to run cdaq9188xt from labview. Run option is broken. when i tried to load DAQInit-sub.vi file, it showing that ''fail to upload nilvaiu.dll''. even if i am not finding cdaq9188xt driver in NI-MAX.

 

Can some one tell me what is the solution of this problem?

 

Best regards,

kaium khan

Re: Edit performance extremely slow after converting app from LV 2012 to LV 2016

$
0
0

Get the latest LabVIEW 2016 patch (f6).  It looks like the f5 patch should fix the issues you are seeing, but you might as well get the latest.  More details: LabVIEW 2016 Patch Details (download links at the bottom of that page).

Re: Search a String within another string

$
0
0

So you have StrA as a list of words you want to search for in StrB?  If that is correct, then use Spreadsheet String To Array with a space as the delimiter to create a 1D array of strings (words).  You can then use a FOR loop to perform the Match Pattern on each element.  Turn on the conditional terminal and you can stop the FOR loop as soon as a match is found.

Re: Width of Hysteresis

$
0
0

Hi GerdW,

 

Thanks for your reply.

 

1. Separate your data into the up and the down cycle.

At the moment all plot date are stored in one array. How can I split in for up and down cycle date? Find the index with max value  for Y and create subarrays?

 

Regards,

Gregorian7

Re: NI visa read serial loses a lot of data

$
0
0

Loses

 

Lose = not find

Loose = not tight


Re: NI visa read serial looses a lot of data

$
0
0

 wrote: how can I log the data into file without slowing the read?

Also look into the Producer/Consumer architecture.  The idea is you have a second loop that does the logging.  The data is sent to this logging loop via a queue.  This way your serial port loop can just do its process and let other (parallel) threads process the data however they see fit.

 

Now where to begin with the rest of your code...

1. No need for any of your local variables.  You can store the data in the shift registers you already have set up (but aren't using).

2. Get rid of that "Stop VI" function.  It is just like hitting the abort button and no clean up of your references (serial port, file, etc).

3. Even when you don't want to process the data, you really should be going through the read process to avoid the serial port buffer from filling up.  Just have the case structure around the queue I mentioned earlier to no pass the data on to the logging loop.

4. The FOR loop makes no sense to me.  Why not just constantly read the packets instead of forcing groups of 16 before writing to the chart?  Charts have a history, so you will still see all of the last X samples (X = buffer size, default is 1024) in the chart.

5. No need for so many Simple Error Handlers.  Just one at the end of the loop should more than suffice.

6. Your data conversion can all be done with a simple Unflatten From String.

7. Your structure in general is just a mess.  Here is a cleaned up version.

8. You can put all of your data into a single chart.

Re: FPGA Write/Read DMA FIFO for multiple channels - FOR loop vs multiple FIFOs

$
0
0

You have made tests, get different results and are not sure which one guarantees data integrity?

 

I think you need to think more about what you are doing so that you can immediately reject one or both approaches if the received data does not correspond to what you were expecting.

 

In other words, build a test where your starting point is known and then try to pass this via DMA and check to see if the end result is correct or not.  What is "right" depends a lot on what exactly you are trying to do.

 

PS One thing I will say, if the data width of your individual dat apoints is 32 bits or less, place them both in a single 64-bit value and use a single 64-bit DMA instead of trying to synchronise 2 DMAs.

Utiliser Imaq en mode Tablette

$
0
0

Bonjour , 

Je souhaite naviguer dans une image ( zoom , dezoom , deplacement)  avec une tablette tactile en utilisant 2 doigt pour le zoom dézoom. Est ce que cela est possible sans utiliser de librairie  payante du style Aleydin ? 

Merci à vous,

Re: NI visa read serial looses a lot of data

$
0
0

Hi,

I tried your suggestion but the problem still persists. Even though the saving happens much faster, I still have exactly the same UN-synchronization and lose a lot of data . The pattern seems to be first it reads 48 packets of data and looses a lot of packets thousands of them, afterwards it reads 772 packets correctly followed by a lose of 48 packets, After that it reads only every other 48 packets of data.

In addition to this the save function gives GpiB error after reading for a while.

Utiliser Imaq en mode Tablette

Survey: LabVIEW FPGA Simulation

$
0
0

Hello,

 

Our LabVIEW NXG FPGA team is exploring how customers use FPGA simulation in LabVIEW.  We’ve created a short survey for people who have used LabVIEW FPGA.  This survey should take no more than 5 minutes to complete and your responses will be an important consideration in our design process.

 

https://www.surveygizmo.com/s3/4691458/FPGA-Simulation

 

Please complete the survey by 5:00pm (CST) on Thursday, December 13th.

 

Thanks,

 

Salvador Santolucito

Product Owner

National Instruments

Generate Digital Output (HSDIO NI PXI 6535) through two channels with a 90 degree phase shift

$
0
0

Good evening, 

 

I have a question:  My requirement is as follows,

 

1. I have two DIO Channels (They're configured to outputs on the fly using DAQmx vis). 

2. I have to generate a 1KHz waveform with a 90 degree phase shift between the two. 

   (DO CH0 - High, DO CH1 - Low)

3. What is the correct way I can accomplish this? Is a software based .5ms delay between the digital output ON state sufficient? Or, Is there a better way of timing both these outputs using the DAQmx sample clock?

PS: If I am to use the sample clock, I will be using the onboard sample clock source. 

PPS: I am alright with fellow members not posting code samples. Just ideas are sufficient along with an illustration maybe since pictures are easier to understand. 


Re: Best Practice: Is it better to write to a front panel object via a Reference>Property Node combination, or directly via a Constant>Duplicate Terminal

$
0
0

 wrote:

 wrote:

This thread  prompts a new question.

 

As mentioned previously the  current gen involves a thread swap for the property nodes to use the UI thread and prevent race conditions blah blah blah. I had understood that as being a hack. So on to the question...

 


I wouldn't say this is a hack. It's a fairly cheap way to make synchonization between multithreaded code and a single threaded UI. ...

 

As LabVIEW NXG is pretty much a complete rewrite for the entire UI part of LabVIEW, with a high potential to never work on other platforms than Windows aside from the headless operation on realtime targets, I'm sure they changed that part in the process too.


OK, "hack" may be a little too far. "Kludge" maybe?

 

6i came out right after 5.1 when LV went multithreaded so there may have been a scramble implementing the change from attribute nodes to property nodes.

 

Where you still with NI at that time?

 

Just throwing out words, don't pay me much mind.

 

Ben

Re: About Reading data and save data

$
0
0

I assume you already have some LabVIEW (note -- there is no such thing as LAbview) code, as you seem to be illustrating (with a picture of a hand-drawn data structure) something that looks like an array of LabVIEW Waveforms.

 

One thing that is very helpful to understand what you are trying to do is to post your LabVIEW code.  Once we see the code, you can explain things in terms of explaining the array of waveforms in terms of multiple runs, varying the position of a laser pointer in two dimensions (we should be able to see this in the code).

 

You mention an "Imaging Plot" -- what is this?  Is this a plot of one waveform as a function of time, or a 3-d plot of intensity (at some fixed time) as a function of X and Y?

 

You say you want to save the output "into the current file" -- do you want to add it to the end of the file, overwrite the file, write a second "Filtered" file?

 

Bob Schor

Re: NI visa read serial looses a lot of data

$
0
0

You should study the shift registers.

You lost file reference after pause

 

file.PNGshift.PNG

 

Also you still read only 18 bytes. If you can't read more, use Producer/Consumer as crossrulz has said

VIPM install failed when install LABVIEW 2018 error JKIUpdateTask.job

$
0
0

Hi everyone!

 When I try to reinstall Labview 2018 after uninstall last week(maybe uninstall in the wrong way), I have a problem. an error was encountered as image below. 

Please help me!

Thank you so much!

 

Re: Open file in LVOO

$
0
0

If I have a chance, I'll go back and try your code, with Clones, again.  The reason I got rid of the Clones is that, for some reason, using the Clone appeared to "lock in" your File Path, which (as might be expected) referred to a file/folder that I didn't have, and when I tried to substitute a Test File on my own machine, it reverted to the one you specified.  I should be able to figure out how to "have my clone and file name, too" ...

 

Bob Schor

Viewing all 202507 articles
Browse latest View live


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