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

How to find whether a number in an array is odd or even

$
0
0

Hi,

 

      This might a simple problem. But I'm not able to crack the issue. Any helps would be appreciated. I have got an array which produces 0 to 'n'(which we will enter. I want to check each number for odd or even and that output should be connected to a case selector( case structure or if loop). If it is true I've one connection else another. I tried quotient and remainder, but it's showing the output of the first value only. Please help me out


RT target: multiple reads of one single-process shared variable possible?

$
0
0

Hello Labview friends,

 

in my application it is necessary to stop the vi.'s running on the RT target when a button is pressed on the host PC. With the help of a network published shared variable coming from the host PC, I can pass the stop-command over TCP/IP down to the RT target. Now, on the target there are three VIs running:

 

  • Control (contains timed loop)
  • Network (contains while loop)
  • Log (contains while loop)

Inside the Network.vi, which is for communication with the host, I pass the stop-command to an 3x1 Single-process shared variable containing the same boolean in each entry.

Unbenannt2.PNG

 

 

Then each of the three vi.'s reads one element of the abort array, in order to stop the corresponding loop.

Unbenannt.PNG

 

Is there a more elegant way to stop multiple loops with one boolean value? I think that with a 1x1 single-process shared variable, one reader can claim the value for himself, leaving the other readers waiting or even missing the value (?). I want to avoid global or local variables. Are Notifiers a solution perhaps? I am aware that there is this knowledge article:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LmXSAU&l=de-DE

 

but here we have not only multiple loops, but different vi.'s also.

 

Best regards

Lysandros

Removing the Number and special characters from string

$
0
0

Hi everyone , 

 

please find attachment 

 

I need to the remove the numbers and Special charcters from the String . only i need to filter the text sentence ( Name of the driver ) and put those things in list box or  table (UI )  . I tried with the Match pattern and Search and Replace function. 

 

Thanks in advance 

guide me 

Hex command for serial communication

$
0
0

Dear Community,

please have a look at the attached code.

For the specified inputs n1=20 and n2=21 I need the string output indicator to be:

020D140D150D (hex display)

instead i get

020D31340D31350D.

How can I achieve that?

Thanks in advance

InsightCM sdk 3.3 add custom device, Detected physical hardware

$
0
0

InsightCM sdk 3.3 add custom device, Detected physical hardware

 

LabVIEW FPGA reported the following error:

The chassis is in Scan Interface programming mode. In order to run FPGA VIs, you must go to the chassis properties page, select FPGA programming mode, and deploy the settings.

 

windows 7, sp1

labview 17

InsightCM sdk 3.3 add custom device, Detected physical hardware

LabVIEW and git

$
0
0

Hello everyone.

I am using git for well known reasons. Now I have to use it with a co-developer.

The big question now concerns the .gitignore file content.

Shall the *.lvproj file also be written in the .gitignore file? That means this fill is not tracked within git. Each developer has its ownl version of *.lvproj. We already had some crashes if this file is not listed in  .gitignore.

Does anyone know a proven workaround?

The minimal .gitignore content

       *.lvlps
       *.aliases
       *.lvproj

Thanks for all the hints

 

Regards

Rafl

How to get certain inputs in Vision Acquisiton Express

$
0
0

Hi,

I am sitting with a project building on another person’s project. The difference is that I use a newer model of the camera so when it is connected to the program it has to be changed in Vision Acquisition Express, and this is where the problem is. Certain inputs is not available, or most likely I don’t know how to activate them. Those that are missing is “Frame Rate::Value”, “Shutter::mode” and “Shutter::Value”. The pictures show how it should look like vs how my program looks like.


reading bytes from a binary file directly, what format specifier

$
0
0

The function "Read from Binary File"   has a datatype specifier.

 

I want to read the file into a byte array.  What should I put in the data type string.

I could not find a format specifier for byte.  

 

The help says

""

data type sets the type of data the function uses to read from the binary file. The function interprets the data starting at the current file position to be count instances of data type. If the type is an array, string, or cluster containing an array or string, the function assumes that each instance of that data type contains size information. If an instance does not include size information, the function misinterprets the data. If LabVIEW determines that the data does not match the type, it sets data to the default for the specified type and returns an error.""

 

Thanks

Octave/ Matlab STFT

$
0
0
Hello, I am trying to implement STFT analysis with Octave and plot the max iteration. But the excepected plot is done by Labview unfortunately I do not have Labview access. My problem is when I compare octave plot and Labview plot, the Octave spectrum is slightly shifted to left as Labview. I need help and Idea, could you help me? Thanks in advance!

Control a stepper motor using a4988 driver board and a myRio?

$
0
0

Hi I am wondering whether it is possible to control a stepper motor using an A4988 driver board and a myRio and what Labview code you would need to make this work?

 

Thanks!

An array to tomographic or tomography image

An array to tomographic or tomography image

$
0
0

Hi , I have an array 20*20 which has different RSS value from 20 wifi sensors and i need to covert this array into an image show the different between each matrix i have so it will become similar to this.. Screenshot (70).pngsample matrixc63626ad-20a4-41d9-91ca-8b7af719a9e8.jpg

Property Nodes & Labview on RT Target

$
0
0

I've got a 1D array of double data that I need to dynamically put into clusters of various composition. Some of them contain a few controls, some contain many. See photo below for example.

 

We wrote some really nice code using property nodes to dynamically determine the composition of cluster and data types and inserted the appropriate data from the array into the cluster. It would look at the control type, and pull out the appropriate double fields from the array, do any necessary conversions, and then put them into the cluster. However, it was all for naught as we eventually found out that none of that works because you can't use property nodes to read and write values to controls on a RT system.

 

I tried to re-write everything using variants and all kinds of Vis in that palette, but it was too slow for our application and some of those VIs also didn't work on RT system.

 

The cluster is important because it defines the shape of a message that is then send out using some other VIs on the RT target, and the adherence to this structure is pretty strict (i.e. cluster must be exact, even down to array size).

 

The best solution we have now is to use a constant of the cluster and put data into the cluster constant using bundle by name by hand, but this is very time consuming and prone to error (we have over 100 different clusters).

 

We've also considered using a constant in a non-running VI and VI scripting, but not sure if that will work on RT target or not.

 

 

 

To break it down into pseudo code:

1. Pass in generic cluster.

2. Iterate through each element within cluster in order.

3. For each element, determine data type and/or number of values necessary.

4. Remove data from array that is needed for the element, format appropriately, and insert into cluster element.

5. Move on to next cluster element.

6. Repeat until end of cluster.

 

Here is a stripped down example of how were trying to this using property nodes.

 

SampleArray2Cluster.PNG

NI Device Drivers hangs up at 0% overall progress

$
0
0

I'm trying to install the drivers on windows 10 but the installation hangs up and no progress is observed. 

Any suggestions on how to solve this issue? or what is happening?

 

Capture.PNG


WebDAV Changes File Permissions

$
0
0

For my application I have a cRIO-9046 running an application and a host computer acting as an HMI. The cRIO creates a .tdms file to save data. I then use WebDAV (NI's reccomended protocol to transfer files) to transfer the .tdms from the cRIO (located at /c/Data_Log_Files/Test1.tdms) to the host computer using "Simple Get". That all works fine. I then do not need the file any more so I have the cRIO delete the file using "Delete" in the "Advanced File Functions" Palette. I then get an error code 8 saying I don't have the proper file permissions. I use the "Get Permissions" function and it shows the WebDAV function changed the permissions from "lvuser, ni, 110110100" to "webserv, ni, 110000000". Since it changed the file permissions I cannot delete the file or change the permissions (using Set Permissions) any more using "lvuser". I need a way to either make sure WebDAV does not change the file permissions or some other way to change the permissions in labVIEW.

 

I've read about using an SSH client to go in and change the permissions using the mv or chmod but this all must be done in the program while its running so I am unsure how to proceed. Thank you!

NI Software :  LabVIEW Professional Development System  version 2018 SP1
NI Hardware :  cRIO-9046
OS :  Windows 10

Recursive VI Calls

$
0
0

I have 3 recursive VI's, LoopA, LoopB, LoopC.

User types in the order that each Vi should be called in.

"ABCCBA"

 

In turn the main vi will call LoopA and pass down "BCCBA"

LoopA will call LoopB and passdown "CCBA"

LoopB will call LoopC and passdown "CBA"

LoopC will call LoopC and passdown "BA"

LoopC will call LoopB and passdown "B"

LoopB ends recursion as the queue is empty

 

 

Main.PNGMainVILoop.PNGLoopA, LoopB, LoopC

I have created a project but it seems the moment a call by reference is made the system gives an error.

Then lab-view crashes.

 

I am attaching the whole project.

 

Any ideas on how to make this work?

 

 

 

Creating custom user item menus for an a FP object within a cluster

$
0
0

I have a front panel object for which I want to create user item menu that shows up upon right mouse click. The problem is: This works fine if the object is not within a cluster, once I place the object within  a cluster, it doesn't . I need to have this object within a cluster. Any ideas how I can fix this ? (Get the user item menu to work while object is part of a cluster?)

Keep stay Support files after unintalled build

$
0
0

Hi All,

After uninstalling build usually support file will be removed from C:\ drive. But i dont want to lost the support file data. when i uninstall the build, only that application should be removed not support file which i included while creating EXE. After uninstall the build also i need to keep the support file in the same location. Is there any way to do that. If anyone knows please reply it.

 

Thanks in advance,

Manoj 

Controlling a robotic arm 4 DOF using kinect. (Finding an Error)

$
0
0

Hello

I'm currently working on my project where I use kinect ( Kinesthesia toolkit) to control a robotic arm 4 DOF and I'm using Lifa ( Labview Interface for Arduino ) as it's interface. I have couples of problems I'm facing:

1. Whenever I start the program the motor servo turns to 90 degree and turns back to 180 degree automatically. I want it to stay as it is before I start the program ( Not Moving by Itself).

2. The angle from my hand and the respond of the robot is not quite the same, for example my hand is 90 degree but the robot is 91-92 degree, not the same which means there are some errors but I can't find the error.

3. whenever I get out of the frame of the kinect the robot moves itself in a random way.

These are the problems that I'm facing, could anyone help me since I'm new to labview.

Viewing all 69232 articles
Browse latest View live


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