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

PXI compatible with Labview 2018?

$
0
0

Hello together,

 

I recently had to reinstall all NI Software, so instead of Labview 2017 I now use Labview 2018. Apparently, the software on our PXI cannot be updated to match the host software however. Do I have to revert back to Labview 2017?

For example in MAX:

 

  • PXI:             Labview Real-Time 17.0.0
  • Host laptop: Labview Real-Time 18.0.0

PXI cannot be updated up to the same version.

 

Best wishes

Lysandros


Controlling size of LabVIEW on screen under Windows 10 Laptop

$
0
0

Dear all,

 

I hope this is not a duplication question. I had done a good trawl through old posts but most searches lead me to threads on how LabVIEW controls screen size. I have an issue on LabVIEW's interaction with the operating system:

 

Running a laptop with Windows 10 my LabVIEW 2016 was working fine. Upon installation of the "Advanced Signal Processing Toolkit" Labview's display windows shrunk down to about a quarter in size. 

All my vi front panels are a mess. I seem to be able to resize the item by item but that is a painfully slow process and it would need to be done for each and every one of them. 

LabVIEW itself is hardly readable and tasks like linking inputs and outputs in the sub-vi control are extremely difficult at this micro-resolution.

 

Checking the computer: the screen resolution (2540 x 1440) and display setting (200%) have not changed. LabVIEW still reacts to changes on the operating system but  

Cranking the display setting up the the maximum possible 225% yield a tiny improvement but upsets other apps.

 

I have had a good search through LabVIEW controls but could not find a fix.

 

Any advice on controls build into LabVIEW that could repair this issue or any advice on the interaction between the operating system and LabVIEW to fix this would be most appreciated.

 

I have attached a screenshot of a before and after view of one vi front panel.

 

Thanks,

Jens  

Ecsaping LED from the mouse

$
0
0

I must : build a program containing two buttons, one button (STOP), manages the work of the program. Pressing it will end the program.
On the front of the panel, apart from the STOP button, there should be a flashing LED. Hovering the cursor the mouse on the LED area is to cause the LED diode to change position on the screen. The diode can change your location to any place in the front area of ​​the panel. Next moving the mouse cursor over the LED causes its dislocation.

I joined something what i tried to do.

I have a problem with the fact that the diode escaping into a random place, escapes from the visible area of ​​the panel.

Good people help me Smiley Very Happy

 

XControl Rescaling

$
0
0

Hi,

 

I am using an XControl and I would like to change its size when the size of the pane it is on changes. Its property node "Bounds" is read-only, so there is no way of rescaling that way.

 

I read somewhere that rescaling could be achieved through the facade VI. I added the event case "Pane" (as you can see below) however the event is not fired when I run a VI containing the XControl - I think it is not the pane the XControl is placed on which referes to this event case.

 

How could I achieve rescaling of the XControl?

 

Best

volfi

 

dsc modbus IO server multiple slave communication

$
0
0

Hello,

I have created modbus IO server using DSC module. it works fine with single slave device. now i want to connect multiple slave device with labview  and labview vi works as modbus master.

Please suggest a way how can i change slave id  automatically and communicate with multiple slave device ?

can i need to create another IO server for second slave device ?

 

 

cRIO 9039 Timing error compiling FPGA when using 9215 module, but only when in slots 7 or 8

$
0
0

This had my colleague and I stumped for most of today!

 

The FPGA code that we have only does one thing. In a while loop it reads an analogue input from a 9215 module in calibrated mode and writes it to an indicator.

 

When the 9215 module is placed in slot 7 or 8 in the project, the following timing error appears at the end of every compilation:

"LabVIEW FPGA: The compilation failed due to timing violations.

Click the Investigate Timing Violation button to display the Timing Violation Analysis window."

 

We tried adding loop timing, using a FIFO, installing updates, different versions of windows, 3 different machines, turning it off and on again... to no avail. The only thing that "fixed" the problem was moving the module in the project to slots 1-6. Has anyone else come across this? Have I found a bug or a feature?!

 

We are running LabVIEW 16.0f5 (32-bit). The compilation tool being used is Xilinx Vivado 2015.4 (64-bit).

 

Producer - Consumer/Producer - Consumer for improved performance?

$
0
0

Hi all,

 

Can the cycle time of a producer-consumer structure be improved by adding a second, sequential, consumer? That is, the first consumer processes data and queues this to the second consumer. Sort of a producer – consumer/producer – consumer (see the VI snippets attached).

 

I'm asking because I use the producer-consumer structure in my application. However, when I’m running other software packages simultaneously on the PC, the consumer cannot keep up with the data acquisition rate.
The producer grabs images from a camera at 10 fps. The consumer processes the image, uses this information as input for a PID-controller and logs the data (including the frame). The cycle time of this occasionally rises to 120-125 ms.; that is too long.

I optimised the data logging by keeping the log file open instead of opening/closing on each write, and by using a buffer to write data only once every second. The computer has an i7-3770 (4 core/8 threads), so not a lot to be gained there. I also tried disabling hyperthreading to boost the capacity per thread, this had no influence.

 

My suspicion is that data logging takes too much time. My thought is to send the output data to a second consumer for the file interactions, essentially making the image processing loop both consumer and producer. The idea of a producer-consumer structure is to parallelise data acquisition and processing. I want to parallelise this once more, but obviously there is a limit to how often one can do this.

 

What do you think? I’m curious to hear your opinions on this.

Read picture "date taken" on a jpg file with labview

$
0
0

I'm trying to read the "date taken" on a JPG file (as seen in properties details. See attached file), not the date the file was modified or created, using Labview.


Timed Loop Timing

$
0
0

Hi All.

In my application I am using 3 loops 

(1) Mian loop

(2) 10mSec Timed loop for Cyclic Transmission of a CAN Message

(3) 20mSec Timed loop for Reading incoming CAN messages

All is working and no serious issues so far however I have noticed that the Timed loops the Timing is not very stable I have seen deviations between 2 and 4 mSec ( I suppose this is part due  OS ) .

My question is is there any way in labVIEW to make the Timed loops execute with a more accurate execution rate, 

Any help comments are appreciated 

PIC1.jpg

Regards 

QMESAR

 

unsigned byte too short

$
0
0

Hello,

 

Could anyone know why the maximal u8 value would be 128 instead of 255 as it should be? I am trying to convert an array of zeros and ones into the array of zeros nad 255's, so i am converting data array to u8 and trying to use rotate function (http://zone.ni.com/reference/en-XX/help/371361P-01/glang/rotate/) with y=-1...

 

Any help/ideas appreciated!

Commanding Opus with labview and ActiveX

$
0
0

Hi.

 

I'm trying to command Opus, a software for spectroscopy. With the old installation we were using DDE, but it seems that it doesn't work with newer versions of labview, and that ActiveX is what we're supposed to use now. So I tried that, using this old thread. But when I get to the Opus dll's, the list is said to be empty.

 

Has anyone have encountered this problem before and could help me ?

 

Thanks a lot.

Issue Reading Spreadsheet Updated Values

$
0
0

I have a large Test Program VI that takes data/measurements and calls an excel spreadsheet file to read the limits. I have a subvi that requires the Test ID as an input in order to find the limit in the excel file for each specific test. The issue I am seeing is that if I make an update to the limit file and rerun my test program, for some reason it still reads the old limit values. However, it reads the correct updated values if I run the subvi outside of my test program. Furthermore, the test program will read the correct updated values if I just disconnect any wire and reconnect it before running the program.

Building a text file into an exe (not the support directory)

$
0
0

I have a config file that I'd like to have included with my application. Adding that file to the build specification and including it with the build is straightforward; that's not my question.

 

My question is this: What happens if the user deletes the config file? In the past I've handled this by looking for the file, and if it doesn't exist, create it with some default values stored in a global variable* or VI or whatever. This works, but it means I have my default settings stored in an unweildy giant VI or global variable. I'd rather create a default config file that gets included at compile time but that is non-deletable by the end user.

 

Now, this may not make any sense, but is it possible to store a "backup" default config file within the executable itself? That way, if it's not detected, the exe can copy the backup one from... "inside itself"... into the proper directory. That would save a decent amount of time and effort when I need to update my config file. I can make it happen storing my default values in a constant somewhere, but it gets unweildy after a while. I'd prefer to automate it if possible.

 

Any ideas? I've tried adding a text file to a project and setting its Build Destination as my Application.exe but that option is grayed out.

 

*global variable- I'm not talking about using a Global as my working internal variable, I just mean using it as a place to store default settings. It would only be edited at compile time, and never read or used in any programs unless it was used for creating a new default file.

 

How to insert new data after every iteration.

$
0
0

Hello, 

 

I am trying to read values off a DMM with a Function Generator and plot them in a table after every iteration. The current vi is giving the values after the for loop finishes all iterations. 

 

You can put a build array after the shift register, but once again the table would be outside the loop.

 

LabVIEW FPGA Basic Connector CLIP and use Strobe Bypass Control

$
0
0

Hello.  I'm attempting to use the NI 6589 Basic Connector Clip.  I've had some success using the Strobe input as a clock by setting the IO_Module_Clock_1_Source = 4. Connector CLIP description here:

http://zone.ni.com/reference/en-XX/help/372614J-01/friohsdio/6589_conn_clipref/

 

This tells the crosspoint switch to use the strobe input as the clock.  However, I want to use the bypass setting as shown in the users guide (so as not to add any latency into the clock).

 

If I use the NI 6589 Serdes Channel CLIP it does give me the option to use the bypass setting.  However, I lose the ability to get to the LVDS I/O as discretes and they all become SERDES I/O.

http://zone.ni.com/reference/en-XX/help/372614J-01/friohsdio/6589_serdeschan_clipref/

 

So the question is... Is there a way to set the crosspoint settings to Strobe Bypass while still using the Basic Connector CLIP?

 

For reference I'm inputting a 100MHz clock on the strobe, and using that to clock in synchronous data on one of the LVDS inputs.  It is a simple 1:1 clock to bit relationship.  If there's a better way to do this please do tell.  Thanks again.


Waveform Analysis - Finding Trigger Points

$
0
0

I've been working on this for a while now and I think I've reached the end of my ability to proceed alone. I have to analyze a waveform and use its shape to determine when certain things have taken place during a test. Essentially I need to identify all the major inflection points. Some images are attached to illustrate this.

 

I think I have it about 80% figured out but I'd like to make it as error resistant as possible. You'll notice in sample 5 in the attached vi, there's some grunge that I'm finding difficult to remove without also destroying the rest of the data. Open to any and all suggestions.

Flatten object to XML doesn't work with default values in class fields

$
0
0

Well, this is odd, and I can't exactly explain ALL of the ways to reproduce this issue, but I've found at least one way to reproduce this weirdness.

 

When connecting a Class constant to "Flatten to XML", it produces empty XML data. I would expect it to produce an XML representation of the default value of the Class, but it's empty. I could *maybe* accept that's intended behavior (though a weird, undocumented way of doing things) but the weird part is that, if you write the default value to the object, then flatten THAT to XML, it still doesn't work- but it doesn't work in a different way Smiley Happy

 

I have attached a small example project in LV2016 to demonstrate, but hopefully the images will help. Not visible in these images is the class definition, which is a Numeric and a String. The default values for these are 42 and Hello, respectively. The accessors are the standard generated accessors, nothing special there.

 

Here we have 3 Flatten to XML functions:

Block diagram.png

 

The first flattens an Object constant to XML. The second writes a new value to the Numeric field, then flattens that to an XML. The third writes the default value back to the object, then flattens that to an XML.

 

Here is the result:

 Results.png

 

Only the second one worked, and the two that didn't work were slightly different to boot. The first one looks like it doesn't even try- the Version is all zeros. Writing a new value to the Numeric field, then flattening that, works as expected- even the String part, which was unused, came through as its default value. The weird part is that if you write the Numeric back to its default value, it stops working again, but this time it at least has the correct Version information.

 

I'm not quite sure how to get around this, other than to make sure I write at least some new value to the default Object.

 

Am I bonkers in assuming this is NOT expected behavior? I would have guessed the outputs to all three of these would be identical with the exception of the second one having a different value for the Numeric field.

 

 

Controlling other program and synchronizing

$
0
0

Hi community, I am working on a project for my internship where I'd like to display messages on a program that runs on a different computer (on a test bench) and here's my two questions:

  1- Is it possible to synchronize them, meaning when one of them starts running the other one also runs?

  2- Is it possible to display messages on the test bench's front panel from my program using for example connectivity tools?

Better Way to Parse Event Data

$
0
0

Attached is part of VI that I am trying to use for debugging purposes. Basically, it uses the Event Inspector to log almost all of the Event Data to a debugging log; the log also contain commands from various JKI State machines running. A sample of the log is below

 

Time                     VI                           Command

2.647235                 Main.vi                      Panel Close? Main.vi
2.647235                 Main.vi                      User Event Macro: Exit
2.647235                 Main.vi                      User Event Macro: Exit
2.647235                 UILoop.vi                    User Event Macro: Exit
2.647639                 Main.vi                      Macro: Exit
2.647655                 Main.vi                      Message: Exit

 

I almost got the "Event Logger" portion working correctly, the only problem is the Event logger uses the millisecond timer whereas the other part of my debugger uses the high resolution seconds as a timer. (The millisecond timer does not have the resolution.)

 

Anyway the attached VI is my attempt to parse the Event data in a way I can use it. It seems & looks cumbersome, and may even make the Rube Goldberg thread. I was wondering whether anyone had any optimizations they can suggest. I did not use regex because I thought that was the worst performer.

 

Code snippet below, VI attached. Default values are included in the VI.

 

Thanks

mcduff

 

Snip.png

 

 

 

 

LabVIEW - Dealing with Decimals

$
0
0

Sorry for posting again about my endeavors to learn how to use LabVIEW, but after searching around for the better part of an hour for a solution to a simple problem, I assume you guys can help me out.

 

So I am trying to create a delayed flat sequence that needs to take data from a case statement that defines how many clock cycles / microseconds it needs to delay by. This ends up resulting in the following formula:

(0.025us * noOP) + microseconds = delay time for the wait function in the sequence. Timing is important as it is being used in an optical setup to pulse a laser; therefore it needs precision decimal points.

 

The problem I am having is that apparently the multiply VI does not like double precision numbers (which is the only way I can get LabVIEW to not instantly round off my number of 0.025 to 0.00). Therefore, the root of my question, is how can I accomplish a simple decimal operation? I know one method was to use the VI package string/ number conversion and convert the number into a fraction, but for some reason it does not show up... I am using a huge license provided by the school, so I assume it would have something as basic as that.

 

Another question I have is will this properly delay the sequence, or is there a better way to go about this? (I saw someone say to never use these because they are slow?) Any advice on the structure is appreciated - it is obviously very simplistic at the moment, but I want to improve my LabVIEW skills as much as possible.

 

The Arduino code would look something like this:

 

digitalWrite(DIO23, HIGH);

delayMicroseconds(microsec+(noOP*0.025));

digitalWrite(DIO22, HIGH);

delayMicroseconds(0.025);

digitalWrite(DIO22,LOW);

delay(1000);

digitalWrite(DIO23,LOW);

etc etc...

 

Viewing all 66814 articles
Browse latest View live


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