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

Quick question about Database Connectivity, SQL, and Intermittent Connections

$
0
0

Hi There,

 

Our company has just begun the shift over to a SQL database. Completely new to me so forgive me for my ignorance. I've figured out how to set up the UDL and all that and I can write and read to the DB no problem. However, we also have a manufacturing plant off-site in which the internet connection isn't the most stable. Before we made the switch over to SQL, I used to log data locally, and then transfer that data whenever a connection was available.

 

My question is, does the database connectivity toolkit have any feature in which this is accomplished or do I have to develop a way to combat an intermittent internet connection? Is there a predeveloped way to combat this issue? My concern also involves storing this in memory in labview. If the connection is down for an extended period of time and the data is stored in a variable, I don't want the possible situation of labview/computer crashing that would result in loss of data. Maybe my only option is redeveloping my write local -> send to server in a SQL format?

 

Thanks!


How to convert string data obtained from serial port to double?

$
0
0

Hi!

 

I am very new to LabView and trying to read data from an OHAUS pioneer pa-313 electronic scale through RS232 serial port. I am using the VISA. I can read the data and see it as a string on the screen but when I try to convert it to a double, it just gets the integer and decimal numbers are gone. Here is the question: What can be the problem? How can I have the decimals as well?

 

FPGA compiling- Timing violation Error

$
0
0

Hello all,

 

I am having a timing violation error while compiling my code to FPGA. I read the NI suggestions for solving this problem but it seems that none of the works for me. For example I can't use single-Cycle Timed Loop (SCTL) instead of the while loops because SCLT does not support the things inside my loops. I do not know what to do. Could you please take a look at the code and give me suggestions?

 (using NI SBRIO-9632 400 MHZ)

 

Best,

Samira

user event with no data

$
0
0

I am just starting out using custom user events.  It seems straightforward to create one, but it seems that the "Create User Event" block diagram object rather presumptiously assume that I must want to have some data associated with the event.  Sometimes one does, of course, but other times, it is sufficient to merely know that the event occured.

 

I think it's rather silly for me to create a bunch of dummy datatypes for events that don't require data.  Is there a way to do this?

 

Thanks.

camera synchronize with daq outputs

$
0
0

Hello,

 

I am a LV newbie, so your patience is appreaciated Smiley Happy

 

I am working with a Prosilica GE 680 gigabit camera linked to my computer via Intel PRO G/T 1000 and I am also working with an M-series NI-USB 6212 BNC. Connected to the ni-daq is a light source on each of AnalogOut0 and AnalogOut1 as well as 3 analog inputs: two of the three are reading from the analog outputs, the other input is a signal from the camera saying whether it is imaging or not. 

 

I have been debugging someone's code that is no longer around to help. The code essentially allows the user to synchronize two things: 1) The capturing and saving of a number of avi's of specified length, which in my hands is typically 2 sec movies at 200fps AND 2) Turning on and off two light sources at specified times during the movie. The problem is in the precise synchronization of the light sources with the camera exposure period.

 

As of now the light sources turn on and off during my movies, which is good. The problem is that the camera turns on late relative to the start signal as evidenced by the "imaging" output signal sent by the camera into one of the analog inputs. The result is that the lights appear to turn on early in the saved avi's since the movie starts later than specified. This is not ideal.

 

What changes do I need to make to the labview code to make sure that the camera is precisely synchronized with the analog outputs?

 

Thanks and let me know what info you need from me.

 

-Alex

Erro 116 while reading binary file.

$
0
0

HI All,

 

I am trying to read binary file and I am receiving error code 116 while doing so for few files.

I can read data from few files but for few files I am not able to read it. But if I write some random number in count input of Read Binary.vi, which is '-1', it reads data without error.

Now I am writing cluster in Big Endian format with Prepend size set as 'False'. I have copied same cluster and have connected it to Read Binary vi(to avoid data type mismatch) as data type with format as big edian only.

I don't know why it is reading few files and why it is giving error 116 for few, and reads them if I give input number other than '-1' to count.

Have anyone of you faced this type of issue?

Also, is there any method by which I can read COUNT so that I can input it to Read Binary.vi(similar method which we apply for reading number of Bytes at port in VISA communication-  its just an example).

 

Any solution is highly anticipated.

Thanks

Error code 1 when Remote Debugging property nodes

$
0
0

Hi,

 

I'm hoping someone has seen this issue before, because it's really frustrating (not that I'd wish that on anybody)!

 

I have a project that I developed in LabView 2011.  Recently I upgraded to LabView 2014, and since then I've had problems remote debugging the code.

 

LabView EXE:  works fine, no errors

LabView Development Environment:  works fine, no errors

Remote Debugging LabView EXE:  all property nodes fail and report Error 1.

 

YesError.gif  NoError.gif

 

The button in this example is set to "Switch On Pressed," not "latch," and I know that boolean values are not valid for latching buttons so I originally thought that maybe the debugger was misinterpretting the button type.  I've since confirmed that property nodes for non-buttons give the same error, however.

 

I can create new code in a new project, and I won't see this behavior.  When I add a new button to the original project, however, it produces the same error while remote debugging.

 

I'm on a Windows 7 machine, with LabView 14.0.1f3.  Is there something that I missed while upgrading?  Have I lost my mind?

 

I'm grateful for any help you can give me.

 

Thanks!

Jason

3D stereo images

$
0
0

For those interested, there are two relatively simple ways to generate 3D stereo images directly from within LabVIEW.

 

Here are 2 documents showing how to do it.

 

When using a 3D TV or projector and active 3D glasses: Document # 43869.

 

Or when using simple anaglyph (red-blue) glasses on any monitor: Document # 43966.

 

If you are interested, join the 3D Vision group!


LV OOP Multiple Instances of a class

$
0
0

Hi Folks,

 

I am absolutely new to Labview OOP and I am wondering how i can create two instances of the same class.

 

Usually in other object oriented programming languages there is a constructor which returns a newly initialized instance. I have the feeling, that every class in LV exists only once. 

 

Can please somone tell me where to find information about this?

 

Thanks

 

Michael 

[Help CAR] Array Split/Replace Subarray IPE

$
0
0

The Help file for the Array Split/Replace Subarray IPE is arguably confusing.

First, the image that illustrates it:

 

Screen Shot 2015-09-17 at 15.02.57.png

differs from the actual appearance of the node:

 

Screen Shot 2015-09-17 at 15.03.59.png

 

Notice the "0" symbol in the actual node above and the icons for the internal terminals.

The 0 symbol indicates the "split dimension", which can be set by a right-click menu option.

For instance, here I choose a split dimension of 1:

 

Screen Shot 2015-09-17 at 15.07.39.png

 

Aside from these cosmetic inconsistencies, the Help describes inputs and outputs in a confusing way (this is as a matter of fact a general characteristics of the IPE node help files):

 

Screen Shot 2015-09-17 at 15.10.33.png

 

Since there is no real connector pane for this node, which moreover has external and internal inputs/outputs, you have to guess what "subarray" is referring to, as well in fact as any other "inputs" and "outputs". For instance, there is only one external array output, yet two  array outputs are described: "subarray" and "array".

Eventually, you'll figure that "subarray" represents the internal output... yet there can be several (the node is expandable). Nowhere is it properly described.

 

The cherry on the cake is the "+" operator used in the Help figure. The "+" node I know has two mandatory inputs, yet only one wire appears to be connected to that node in the illustration. I conclude that it is connected to both inputs, but this is masked by the way the wires have been layed out.

Perfect no-no stylistically...

 

Tested in LabVIEW 2013 SP1 64 bit

 

 

Array values resetting

$
0
0

I built a VI that I believe should initialize an 8 element bool array to all FALSE. Then on each iteration of the for loop it's in, should turn each increasing element to TRUE. But in each loop iteration, the previous element is returning to FALSE rather than staying TRUE. Why is this, and what logic is needed to avoid this?

FPGA Square Wave on Waveform Problem (DMA Transfer)

$
0
0

Hi to everyone,

 

I would like to produce internal square wave which frequency is controlled by Frequency Control component in FPGA.
Then, sent it to Host.vi and show square wave on Waveform Chart.  When I change frequency, it needs to effect instantly waveform chart about square wave. This should be effective in terms of transferring data. I am using FIFO DMA transfer to Host.vi.
We can think this like oscilloscope on PC.

 

I am getting square wave on Waveform Chart but when I change frequency, it produces same square wave. How should I handle this problem?

What I am using:

  1. Square wave generator that produces square wave which gets frequency from my Frequency Control component.
  2. It writes to FIFO.Write
  3. Then I read it from Host.vi FIFO.Read

Thank you.

Grab and save AVI video in LabView

$
0
0

Hello,

 

I've made a program for grabbing AVI videos, see attachment. My problem is the speed of the saved video. It's to fast. I've tried to adjust both the frames per second input (Video speed control) and the loop speed. But it doesn't help.

Any tips or solutions?

 

br,

paalbrok

How to create a "front page menu"

$
0
0

If I want to have a menu at the begining of my VI, to let the person choose what function they want to use, how would I do that?

 

Lets assume that each function has a very large front panel with different controls and indicators, so you need the fropnt panel to look completelyu different depending on what function they intend to use.

 

The only way I can think of doing it, would be to use a property node to disable or enable certain controls and indicators depending on which function the user selects, but that seems very long winded and would mean having loads of empty gaps since you can't place two controls or indicators in the same space.

 

Is there any sort of "page" system where you can have multiple "pages" on your front panel, and design each "page" for a different function?

 

As an example, lets say the front page said "welcome to this program, please enter a username and password" and after that "choose from the following options", and then clicking option 1 brought up an oscilloscope, option 2 a power supply, option 3 another type of control or instrumentation etc.

 

If you had to have it all on one page with property nodes, it would be too big.

Linear fit not working as expected?

$
0
0

Hi,

 

I'm using the NI_AALPro.lvlib:Linear Fit.vi on an array of vertically stacked points. However, the result makes absolutely no sense, the fitted line doesn't represent the input data.

 

But if I rotate the points by 1 degree, the fit seems to work...

Why is that and is there a function or a way to properly fit the points regarding their orientation?

 

Thanks in advance!

 

I have attached:

  • The VI itself
  • A screenshot of the VI
  • The test image (no rotation)
  • The test image (rotated 1 degree)
  • A screenshot of the fitting result (no rotation)
  • A screenshot of the fitting result (rotated 1 degree)

VI screenshot.PNG

 


how to indicate the status of machine in stack light indicator using labview

$
0
0

hello , i need to indicate the status of a machine,whether it i running or stopped or faulty by means of stack light indicator.

Is there a way to achieve this using labview????

Classes: Child connector pane does not match

$
0
0

Hi,

 

I'm using LabVIEW classes in one of my projects and I occasionally run into this:

 

When I create a child vi by creating a vi of the appropriate name for the child class instead of using the built in "create vi for override" the connector pane of the child is flagged as not matching the parent's pane - even though it seems to me that it does match.

Note that I only do that because I want to keep the FP of that specific child vi.

 

This makes me think that I don't really understand what needs to be exactly the same.

The dynamic dispatch input/output are of the class that the vi belongs to. That shouldn't be a problem though, right?

All the other inputs are of the appropriate types (simple stuff: error cluster, U8, I32, boolean, DBL).

Do they need to have the same lables and names?

They are in the right positions too.

The connector panes share the same pattern (standard 4x2x2x4).

Anything not listed here that I am not even aware of?

 

Any hint would be appreciated.

 

Best regards,

Florian

remove duplicate elements of a cluster

$
0
0

I have a cluster of elements that consists of the following information:

column 1: String of user names     column 2: Numeric of times

EX:

 

Doe, John    65

Doe, Jane    45

Doe, Jane    55

Doe, Jim      35

Doe, Jim      20

Doe, Jim      75

 

What I am trying to do is turn that into the following:

Doe, John    65

Doe, Jane   100

Doe, Jim      130

 

Please advise.

Split array content

$
0
0

Hi,

 

I am working with hexadecimal data in an array. I want to split the content of the data to a 2d array. 

So, what I want is for example, I want character 1-2 in one cell, character 3-10 in the next cell, and so on. 

 

Do youhave an idea how to help me?

 

Thank you!

Change point color in graph if it's inside a certain range

$
0
0

I have a plot that's got a red line on it, which is the flow rate of some pump. The pumps have a maximum flow rate, and I'd like to turn the points pink when this is hit, and back to red when it's below. How would I accomplish this programmatically?

Viewing all 69272 articles
Browse latest View live


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