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

PID Autotuning in LabVIEW

$
0
0

I worked a lot with PID control from LabVIEW of various heaters and ovens like 15 years ago. My general impression of the Autotuning functionality back then was that, in addition to having one of the GUIs with the greatest potential for improvements I ever have come across in the LabVIEW world, the autotuning itself almost always failed. And yes, I used the special toolkit for PID control.

   My question now is if this have improved significantly in both respect the last decade, or if this still is a weak spot within the toolsets available from NI ?  Comments, anybody ?

Martin


Running labview DLL on runtime engine

$
0
0

Good morning,

 

So I have a program in c# (a form) which ive built as an executable for a different pc. this program works on my pc when i run it. All the C# stuff works when i run it on the other computer. However, when i try to run the executable from the other pc, i get an error when calling my labview dll.

 

"Could Not produce result"

I have 32-bit 2019 labview, and the current runtime engine is the 32-bit 2019 run time engine. Does anyone know what i could be doing wrong here?

 

In C# i have a reference to the Labview DLL and it works fine on my computer (where labview itself is installed)

 

RS232 Communication with Faulhaber Motion COntroller MC5010SRS using myRio1900

$
0
0

Hello,

 

I am trying to run a Faulhaber brushless motor (model: 3274G024BP4) using the motor driver (Faulhaber MC5010 S RS) from NI myRio-1900 controller. The Rx and Tx of the driver are connected to the Tx and Rx of the myRio. The UART communication is done using VISA resources.

 

I am utilizing the telegram structure protocol to communicate via RS232. This is mentioned in the RS232CommManual.pdf file (attached), page 15. The data in the telegram is to be sent as follows:

 

  1. First Byte:        SOF (start of the frame)
  2. Second Byte:   Data length 
  3. Third Byte:       Node number of the driver
  4. Fourth Byte:    Command code (page 16 in RS232commManual)
  5. Fifth Byte:        LB of Object Dictionary's Index number
  6. Sixth Byte:       HB of Object Dictionary'ss Index number
  7. Seventh Byte:  Subindex of the Object Dictionary
  8. Eighth byte:     CRC byte (checksum)
  9. Ninth byte:       EOF (end of the frame)

All these numbers are in hexadecimal.

 

Just to begin communication from myRio. I took the simplest problem of querying the device of its serial number. For this purpose, we need to access the 0x1018 index number (unsigned 16 bytes) and 0x04 subindex (unsigned 8 bytes) of the object dictionary. Therefore, in LabVIEW, the following was sent:

 

53 07 01 01 18 10 04 F4 45 (without the spaces)

 

The same task was performed in the Motion Manager software of Faulhaber. For this, the second pdf (Software manual) is referred. It is mentioned that the commands in this pdf will work only in the software and not other platforms (page 73). Therefore, to execute the same functionality, the protocol mentioned in page 78 was followed. It runs successfully in that software and we receive the answer (serial number) from the driver (pic attached). The following was sent in the software:

 

TRANSMIT 001 01 18 10 04 (using the Software Manual, page 78)

 

But when I run this query in LabVIEW myRio using nothing happens!!. A timeout error comes which indicates that the driver did not understand the protocol and thus no response came within the default timeout. I did three modification of the same LabVIEW codes (attached: comm_test_01.vi):

 

  • Each byte is sent one by one and after that, we read
  • Each byte is sent one by one and simultaneously read for acknowledgment and then the last read is put to see the serial number.
  • All bytes are sent at the same time and then we do read

None of the above three iterations showed any response and timeout error occurred. I also have a question whether we should acknowledge instantly as in iteration 1 and 2 or send the bytes as a whole and then acknowledge (iteration 3).

 

It is confusing that the same function of querying serial number works (although different protocol) on Faulhaber Motion Manager software but not in LabVIEW.

 

It would be great if you could point us in the right direction and point out the mistake in the communication protocol.

 

Thanks in advance!!!

 

 

Connecting LabVIEW to Arduino through Latte Panda

$
0
0

Hello Community!

     I am currently trying to use LabVIEW to run Arduino that is implanted on a latte panda. On the latte panda I have downloaded and am running labview 2020 community edition. By using the makerhub Linx tool I was able to connect to an external Arduino board by using firmware wizard and used the pre-built firmware upload type . However when I try to connect it to the internal Arduino Leonardo using the same method labview doesn't seem to recognize it. Has anyone else faced this problem and know if its even possible to make this work? Thanks in advance!

Training module error

$
0
0

I'm taking the LabVIEW and LabVIEW NXG core training modules.  In the NXG module practice problems I keep getting an error: error_Search and Replace Pattern.gvi. with Exception: System.Reflection.TargetInvocationException.  Has anyone seen this and how do I replace it?  I tried re-downloading the exercises and solutions but this doesn't change the outcome.

Re: Inconsistent behavior using Ocean Optics LabVIEW driver

$
0
0

Hello,

 

I am having similar problems with a USB2000+ Spectrometer.

I was able to use spectra suite, but the spectrometer was not recognized in Labview. So when I dig into Initialize.vi (from the Ocean Optics 2000 4000.lvlib) I found the instructions to Install the INF file.

After I done that, SpectrSuite does not work anymore, it is not seen when I launch the program.

Uninstalling and installing it again did not made the trick. I suspect a problem with the driver maybe?

 

Help appreciated,

 

Gaston

add 3.0 usb external hard disk to PXIe-8840

$
0
0

Is there a way to add an external 3.0 usb hard disk to my PXIe-8840 controller running LabVIEW RT 2016?

Fonts displaying differently on different computers

$
0
0

I am developing an application on my work PC with a specific font, one I have used a couple dozen times before without issue. Now however when I put my application on the target machine the font is showing up differently. I include the font with the source code because not all Windows PC's have them and have tried manually installing it several times. Just today I have upgraded to LabVIEW 2020 so maybe that has something to do with it?

 

Font on Work PC.png

How the font should look

 

 

Font on Unicamp.png

How it looks on target PC


Cluster of indicators - updating elements cleanly

$
0
0

Typedef is a cluster of indicators.  Is there a good way to just update each indicator at will, without property nodes or locals?  Bundle by name means you have to update the whole cluster, or local variable it to the 'input cluster' so you can just replace 1 element.  Reading FP control clusters is clean but writing indicator clusters it would seem, isn't.  Seems like we need a bundle by name that only writes whatever you bundle and leaves the other elements alone.  Otherwise how do you typedef groups of indicators other than with a cluster?  

10進数文字列を空白部を0で埋めて合計で3桁表示にする

$
0
0

数値を10進数文字列に変換し、この数値を空白を0で埋めて3桁にしたいのですが、よい方法ありますでしょうか。

例えば、[1] であれば [001]、[12]であれば[012]というようにです。

 

宜しくお願い致します。

OOP Structure for a Machine with Multiple Stations

$
0
0

This seems like a simple structure setup, but I just want to get some input if this is the right approach. Basically I have a machine with 8 stations (2 shown in the example below) running in parallel loops. I'm planning on having a "machine class" that has things like the machine name, location, and number of stations for private class data. Then I'll have a "station class" that will contain all the data for each individual station and references to all the controls and indicators for each station.
Is my general structure shown below correct? Basically, populate a single machine object with machine level data, then run a FOR loop to produce and populate 8 (2 in example below) station objects all with duplicate machine data populated in it. The station is a child of the machine, so it inherits all the machine level private data. Station loops should never need to write machine level data. The station loops only have to write station level data. But station loops will need to read machine level data as shown in the example. 

2020-05-27 17_06_33-Structure Testing Basic.vi Block Diagram on GOOP testing.lvproj_My Computer.png

 

 

10進数文字列を空白部を0で埋めて合計で3桁表示にする

What is the differrance between Labview and Labview SP1 ??

$
0
0

I'm using Labview 2015 SP1
I wonder the differrance between Labview and Labview SP1.

Change class interface

$
0
0

Hello,

 

I have some old classes and in lv2020 i need them as interfaces. They have no private data. Is there a way in LV to change lvclass to interface and interface back to lvclass?

 

 

Using 2D Interpolate vi on a jpg

$
0
0

So I have a jpg that I converted and downsized to a 2D array. I want to be able to use the bilinear interpolation method on the array and see the difference using an intensity chart. However, I am having a hard time understanding the inputs/outputs of the Interpolate 2D vi provided (https://zone.ni.com/reference/en-XX/help/371361R-01/gmath/interpolate_2d/).

 

for what think the connections should be:

 

X = the input array that I have

Y = the value that I want to interpolate by

Z = the new value created from the X and Y

 

Z being connected to an intensity graph to show the new array.

 

 

One issue is, I want X to be a control but it needs to be a 2D. I understand how to do bilinear interpolation by hand but with a pretty hefty array I am kind of stuck. 

I've tried to look deeper inside the VI's created inside of VI's to try to better understand but it gets more complex everytime. Still very new to Labview, any help would be appreciated. 


Labview virtual environments?

$
0
0

Hello,

I got various projects with various versions of Labview and it would be really useful for me if I could install different versions of drivers on the same machine ( eg daqmx, imaq etc.) as the drivers (if i use the latest version) are not always compatible with some of the old firmware I got on the hardware (at this stage I do not think it is possible for me to upgrade all the firmware of the hardware we got). Does anyone know if there is a way to create virtual environments like in Python?

Thank you!

NI Vision VS eye in hand or eye to hand calibration

$
0
0

Hi. A new problem. Product is put on a platform.Camera fixed on hand takes picture of special points.Then Labview trasfers pixel coordinate to mechanical world coordinate. They

use Labview to call OpenCV or Halcon operator which conclude special function.But Labview don‘t. Anyone has any idea? How to trasfer pixel coordinate to mechanical world coordinate?

Program to turn on the LED when motion is detected by setting 3 areas

$
0
0

https://forums.ni.com/t5/Example-Code/Motion-Detection-Using-NI-Vision/ta-p/3532423

 

AAdoordoorbb

A Chamber: Door: B-chamber
After dividing into 3 areas and setting the ROI
 
I want the LED to turn on when motion is detected.
 
There are many examples of ROI setting, but I am going to upload it here because it is too cramped and going crazy.... I used My Labview, but this is my first time .. Please ... I think it would be a hope if someone could answer me.Hyo .. Thank you.

Determining VISA COM Port Binding

$
0
0

Hello, 

 

I can use the attached way for determining VISA COM Port Binding.

simply when I chose port number 3 for example the output will be 3 (number). 

How can I reverse the process!

I mean I want to make inter the number and the output to be the port number.

 

snip1.png

 

 

Mouse click using user 32.dll not working

$
0
0

Hello all,

I have a very weird problem. I will try to explain it in as much detail as possible but if its still not clear please ask.

I made this tool to read mouse clicks save them in a file and simulate them later this should work along with another labview application . hence the recording screen should move back perform the click and the screen should move forward. All of which I have achieved using user 32.dll. the whole application is working fine on pc (which has windos 7  installed ) but its not working on machine which has a panda with windows 10 installed . The setting of screen to back ground and set curcours dll are working but the mouse click is not working when the other labview application is running even though the other applications are not using user .dll. note that the application is working fine even on the panda when no other application is running. i have tried to get last error and check return values upto no use all return values are normal and no error. upon a little bit of digging i came across uipi i think it might be blocking it some how but i hvae no idea if it is bkllcking it or how to stop it .

any insight would be much appreciated 

thanks in advace

 

Viewing all 69536 articles
Browse latest View live


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