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

OPC UA connection problem

$
0
0

I have a problem connecting to an OPC UA server. I used the simplest version of NIs Example here

 

https://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/establishing_connection_btwn_opcua_svr_clnt/

 

but no matter what I do i get the error

 

-356653 The status of the OPC UA server is uncertain. 

I have tried setting the "trust all servers" to true, i have tried providing certificates... nothing works. Other software such as UA expert connects instantaneously without any issues. How hard can it be?

 


Frequency to Voltage with NI 6002

$
0
0

Hi all

 

I am having a color sensor that outputs a Frequency in kHz that quantifies a particular color, when a LED is switched on. ( For e.g Red gives 12 kHz; Green  8  kHz and Blue gives 5  kHz)

At first i was planning to use a Freq to Voltage converter  (like LM2907) and the obtain voltage. But since i already have a NI 6002 box for another purpose in the same project, i was thinking whether i can i wire the sensor output directly to Analog Input of NI 6002 and get a reading/result ? Or would it be better to use Freq to Voltage converter and then proceed?

 

Thanks

LabVIEW Event names are completely off

$
0
0

Hello all,

 

I just encountered my strangest LabVIEW bug yet: I re-installed LabVIEW 2015 SP1 this morning. All the other modules I use were installed and I installed LabVIEW "under" those modules. When I just used it for the first time I noticed some strange behaviour:

 

When I created an event structure the default event case it was created with was the "selection change". I wondered what had happened to time out and when I tried to change it to value change it was called "Key repeat". Scratching my head a bit further I found out, that the events seem to be renamed only, so key repeat behaves exactly as value change would but it gives me back the event data node that belongs to the key repeat element.

 

In addition to all, there is also a <this VI>/Event17 which I'm a bit afraid to find out what it does and which will also be the name of the bar I'm going to open if I can't get this solved and have to go into exile.

 

Is this a known issue?

 

My Exact Version of LabVIEW is: 15.0.1f10 (32-bit)

I think I'm going to try reinstalling it and see if that helps. I'm open for suggestions both for the solution of this issue and good mental health institutions.

 

Possible causes:

The re-installation this morning. I accidentally uninstalled it, when trying to repair the CVI Runtime engine. The partial reinstall could have screwed something up.
Or maybe it was the installation of NXG last week. idk

 

P.S.: O course, I should mention that this is also the case for my existing projects.

Chirp error

$
0
0

Hi,

I'm using a cDAQ9172 with a NI9263 module to produce a chirp signal that eventually will be read by a 9215 module in the same chassis. (I'm not there yet)

Based on a example posted in the forum, I can generate the chirp and change the characteristics on the fly. When the chirp signal is finished, an error pops up (Error -200621).

The Is Task Done.vi and Reset Device.vi were placed there to get rid of the error, unsuccessfully though. Thanks for your help!

Using Labview to control the Digital I/O of a Virtual Bench

$
0
0

Hi,

 

I am trying to use this example to create a 5V pulse to a device. http://www.ni.com/example/52071/en/. I want to use the 5V digital output line on a Virtual Bench to create a short laser pulse. (The laser is just driven by a 5V pulse of any length.) I can use it to output 5V manually (just by toggling the button), but I dont know how to incorporate the Output Array Control into a timed loop or something else. 

 

Thanks,

Matthew 

OPC server 2012 cannot connect to Labview 2012 most of the times?

$
0
0

Hello, once in  a while I need to set up a new PC with the following, and try to get the OPC-server and Labview 2012 to talk to each other:

  • Labview runtime 2012
  • OPC server 2012
  • DSC runtime 2012 (needed purely for licensing reasons, to get OPC running)
  • Siemens PLC

My setup is that in OPC servers configuration I write the tags connecting the actual database adress on the PLC with a name accessible as shared variable. For example a tag with name "FF17.PLC1.Failure_bits.TI506_F" connecting to DB301.DBX55.1

 

In the labview project I deploy the library "OPC-Library" with OPC i/o-server "PLC1".

 

And then magically I can access the OPC tag in Labview code with adress like

ni.var.psp://localhost/OPC-Library/OPC1/FF17/PLC1/Failure_bits/TI506_F

 

But most of the time this does not work, and I never understand why! I reinstall the OPC2012/DSC 2012, etc. and in the end I often get it to work. But have no idea what I do wrong really. Is is naming, different version of Labview/OPC/DSC? Phase of the moon?

What is clear is that when I look in Distrisbuted system manager I can see my "OPC-library" with i/o server "OPC1". When it works I also have all folders with tags like "PLC1/Failure_bits". When not working I see only folder "NI OPC Client Status". See screenshots.

 

I just had a working installation, made a few changes to OPC tags and the Labview code. Compiled for LV2012. And bang, it does not work!
Reverting to old working exe and OPC file also does not work anymore. So clearly I am missing something here.

 

Can you help me out?

 

 

Login and Retrieve Data From Website Using Labview

$
0
0

I am trying to login into a given website and retrieve three results. I can auto fill the Username and Password, but cannot submit the login information. I have tried from examples here, but cannot get over the hurdle. After, I do login I would like to read back from the embedded web browser three results into three separate strings. I am using LabView 2016. Any help would  be appreciated.  

Copley Motion Control through CAN crashes Labview 2016 32 bit

$
0
0

Hi All - Would appreciate any help in determining what is causing the software to either get hung up or crashes LabVIEW altogether. 

We are using Labview 2016 32 bit, and two Copley Motion Controls STP-075-07 StepNet stage controllers to control and move a linear stage and a rotational stage.  We used the CopleyBasicGui.vi that came with the StepNet controllers as our template to modify for our specific programming goals. Attached are the Labview subvi routines that simply open the device, send and receive commands to the stepney controller then close the device.  These vi’s work just fine in a single operation, but when used repeatedly in a loop, it will either have a soft crash:  it gets hung up at the “copley.setup.vi” or a hard crash: closing down LabVIEW entirely.

 
1 program opens the copley device at the beginning of the routine, then loops a bunch of times, sending and receiving info from the Stepnet, then closes the device.  This one will crashed Labview entirely after performing 95 out of 100 loops.
The other program opens and closes the device for each command, which results in a soft crash after about 32 loops.  “Home and Load Large Optic Stages.vi” and the other 2 routines are based on the “CopleyBasicGui.vi”.
 
If you can see where we went wrong, or have another Labview example that shows how to correctly communicate with the CMO 32 bit and the stepnet controllers, that would be great.
Thanks in advance for all your help!
 

Is there a better way to build these arrays?

$
0
0

I am using Labview 2014 but it shouldn't matter for my question.

I am using a Labjack to monitor 20 digital inputs.  This is a common type of test setup for us.

 

Is there a better way to build these arrays to save space? 

In the process of thinking about this question, the second pic occurred to me.

I haven't tested it yet, but thought there has to be a better way than what I have been doing.

Labjack 20 input.JPGArray of 20.JPG

 

win-login on web-server

$
0
0

We have a corporate network with Active Directory.
I'm developing an application using the LabVIEW Web server.
When a user opens the page of my server, he sees certain information. I want this information to depend on user's login.
In C# (.NET), it's easy to get a user's win-login without password entry forms. For example, we have a corporate website. When I open it, I immediately get into my personal office without any authorization. Is there a way in LabVIEW to find out which user (his login) is accessing the page? Using this information, I can extract the necessary data from Active Directory and display it on the page.

How to write array elements in a file n times.

$
0
0

Hi, i have an array of 8 elements and i want to write this array n-times in a file (i.e 10000 identical copies of the array in a file) .. how to do it ?

 

tnx, Massimo.

Stacked structure with sequence and for loops (signal generation)

$
0
0

Hi there,

I recently stuck trying to implement my Matlab code in Labview for one DAQ project. The code itself is attached, but I will break it down so you can quickly point out where I made a mistake. Sorry that I didn't attach any decent screenshots, because I assume that there will be too many of them in one post.

global Torqueflag
global TorquePrev
global k
global NTOffset
TorqueMechS = GTorque*
TorquePhz = TorquePhase/4;
Tmax = 2500;
Torquemax = Tmax/0.65
ShaftOffset = 0;
NTOffset = 0;
WReached = 0;
LastCycleFlag=0;
ATororder = 0;
TorqueOrder = TorquePrev;
 Tlim = 0.8*Torquemax;
WLimit = Tlim*pi;     

This part of the code depicts initialization of some variables. I’ve decided to use a sequence structure with the initialization part in the first frame and then divided my code into two additional frames. For the variables, I was using local variables.

The cycle “If Trigger ==1” I’ve decided to omit, for now, just to make the code a little bit tidier. With regards to the second if cycle “if TorqueFlag==1” I used a case structure with a for loop where I put the equation for the TorqueOrder calculation and then the “break condition” cycle to exit the “if Torqueloop”.

After the cycle is finished and TorqueFlag = 0, the second part of the main loop starts executing – right now in the “False case structure”. All the if cycles are also there to check the system’s conditions and its parameters.

Overall it is a pretty simple code, but I think I made a mistake in the implementation of the n-count (Increment). The number of iterations should increase only in case of the “if TorqueFlag=1” when we are trying to reach the condition TorqueOrder<Tlim… So I implemented the outer loop as a while loop with shift registers, and it was working fine. I don't have my hardware system right now, so I was checking the code by inputting some constant values to the code, to verify its behavior.

However, I’ve noticed a bigger problem when I decided to test the code with the saved feedbacks from one of my simulations (the same code). So I have five save channels with the sample rate of 1ms. I input these signal to the designed code. I’ve never done, so after checking the forum, I found a really neat solution with the use of a for loop with the timing of 1ms that will mimic real generation of the signal. I’ve tried different combinations of for and while loops but could not make these two codes work together. I assume that either my iterations count has been implemented in the wrong way, or I need to do smth with all the for and while loops in the code. When I was troubleshooting the code, I’ve noticed that when the “k” reaches 17/18 cycles (it should be like this according to the math model), it resets to zero, and the whole cycle starts again. It causes some crazy oscillations in the output.

When I was checking the code on its own, I did not observe these issues. After counting the required number of cycles, the code switches to the “false case structure” and executes there.

I know that it is a long description of the problem and the code, but hopefully, it will help to save you some time. I have been trying to crack the code for the last few days and does not seem like I am getting any closer. Thank you and have a great day!

How to write array data into a binary file in chunks?

$
0
0

hello ! i have a pre-allocated array of size 100 rows on which the data is being written after reading packets from serial read. My array keeps on replacing by the newer data when all of its 100 rows are filled.  I want to ask that how do i add a "record" button functionality to my program so that as soon as i press the record button the array data starts to write in the binary file from the current text entry position of the array and when i press stop button, the file writing stops. for e.g if my current text entry position was at index value 40 and i press the record button , then the recorded file must start from the value which was placed at index 40.

I don t know what s the problem this messagy...

$
0
0

prob1.png

First, i checked 'Thorlabs.MotionControl.Tools.WPF.UI' dll file. Its on the folder where its need place.

 

...I don t know... what i have to do...

 

please help me.

 

Thanks.

Compliation Timing VIolations at 200 MHz

$
0
0

Dear All,

I am trying to compile my FPGA at a faster clock-cycle (200 MHz) than the default 40 MHz. Unfortunately I get a Timing Compilation Error on the standard NI PID SubVI attached below.

Could someone give a suggestions on how I can overcome this problem.

I am using LabVIEW 2016 and my FPGA Target is 7853 R.


need to modify a labview exe

$
0
0

Hello

I have an .exe file created with labview in 2014. The colleague that created this is not available and I need to find out how it works. Is there a way to to open this exe up in labview and see what it is actually doing and it works in the background or do I need more than than just the exe file?

 

Any help will be appreciated as I have never used this type of software before.

 

 

Case structure of a typedefed enum

$
0
0

Hello,

I have the following situation:

 

image.png

Normally, the case structure should offer named enum values for cases, but it doesn't. Can you tell what am I doing wrong?

I already tried with help of the type cast, coerce to type functions with no success.

 

Thank you!

Hardware for LabVIEW

$
0
0

Hi,

I am still beginner in using LabVIEW, I have an application now which consists of two motors and two pumps and two digital sensors, the motors are 3-phase, 

Which DAQ would be the best for this system and is there a Relay switches board that I can use!?

Thanks in advance

Regards

Hatem 

Best way to get score golden template / particle analysis

$
0
0

Hi to all.

I am developing an application that do the next:

1- User take a template

2- A camera is taking photos each 600ms.

3- In each photo I find the template with pattern matching and then in that ROI I compare the photo with template using golden template and particle analisys (like in this example but without remove particles.

 

Now I would like to get an score of mattching.

What I do now is the next:

1- I get area ROI with pattern matching. ROI is the boundig box where the template is in the image.

2- Get are of boundig box

3- Do golden template and then with particle analisys vi  I get Area of particles (defects). I generate the score like this:

     Area bounding box ----------> 100% OK

     Area of particles --------------> X% 

    score = 100 - (Area of particles*100)/Area bounding box

 

So I relate the Area of bounding box with the area of defects particles that "particle analysis" returns me.

 

The problem with this method is when for example I have a template wich is letters, for example: "Precaution". In image, letters are in white colour and background in black colour.

And now imagin that letter "n" in image does not exist. So score will give me around 100% (98% more or less) because "n" is compouse by a few pixels compare with bounding box.

And in this case I have to return a "bad picture"...

 

So exist another method to get a better score with particle analysis?? maybe related the pixel defects with another thing?

 

Thanks a lot.

change Can Bus Baud rate after run the program (after initialize)

$
0
0

Hello,

I using Labview 2012 and Can Bus.

After the program has been initialized, how I can be able to change the host CAN baud rate and maintain host communication.

 

 

 

Viewing all 66885 articles
Browse latest View live


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