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

Ensuring 2 blocks are sequential within parallel commands

$
0
0

Hi all,

 

I am using labview to drive some haptic controllers over an I2C interface. Because these controllers all have the same slave address I am using a I2C multiplexer to give be able to activate them separately. I want to be able to run the activation of them in parallel to each other (so that there is overlap between them but not necessarily starting at the same time.) However, since I am going through the a multiplexor, in each haptic command I have 2 write commands (one to multiplexer to tell it which controllers to write to, followed by another command to send to the haptic controller. How do I ensure that these 2 labview blocks are done sequentially? e.g. I do not want the second haptic controller to send the command to the multiplexer in-between the first one sending its command to multiplexer but before it broadcasts an I2c message to the slave device?

I hope this makes sense, and help is greatly appreciated as I am still relatively new to Labview Coding

 

Regards,

Ben


Need help making a simple math loop

$
0
0

Hey there,I'm an idiot who spent the past 2 hours trying to do something really simple but failed to do it.  

Basically i have a number(lets call it X) this number needs to be higher than Y(another constant), and if it its not , i want to keep multiplying X by 2 until X is bigger than Y, what i'm failing to do is the loop for some reason, i keep getting " wire is a member of a cycle".  

Thank you all

I want to control multiple temperature zones with visa read/write. How do I set up multiple numeric controls in labVIEW?

$
0
0

Hi,

 

I just started to use LabVIEW and after checking the tutorials I have some questions. I want to control a machine with three different temperature zones. The machine is controlled by sending a fixed set of commands like "soll=1,3700;" (this means: set channel 1 to 37 °C). To send the commands via USB connection I use the basic visa read/write example (I have the visa drivers). For the temperature input I created the commands using a numeric control and "format into string". With this setup it is possible to set the temperature of one channel.

Since I want to control the temperature of three channels I added multiple numeric controls and "concatenate strings". From there on I have a few questions/problems:

 

1) If I run the program once it will only set the temperature of channel 1. Is "concatenate strings" the wrong tool to get multiple commands into the visa write? The tool only sends the first command right and the rest gets mixed up. Do I need a break between the commands?

If I run the program continuously it will sometimes update all the channels correctly, but this leads to another problem:

 

2) If the program runs continuously it will constantly send commands. I want the program to only send commands when I change the numeric input for a specific channel. Do I have to use a case structure for that and how do I wire it?

 

3) There is also a temperature probe that can be read with the command “is=6;”. I would like to constantly read the temperature. If I use the visa write/read I will get an answer like “read,is=6,4000k” (this means: channel 6 is 40 °C). How can I extract the 40? I tried “scan from string” but it didn’t work.

 

Thanks in advance for your help and comments!

 

Here's my current progress:

 

labview.png

 

 

Query regarding interfacing LabVIEW code with PLCs

$
0
0

Hello,

 

I have a query regarding conversion of LabVIEW program into Structured Text/Ladder Logic program for PLCs. Is it possible?
 
Simulink PLC coder generates structured text and ladder logic in a variety of file formats used by 3rd party IDEs like CODESYS, RSLogix5000, SIMATIC STEP 7, PLCOpen XML etc. Does LabVIEW support similar 3rd party IDEs?
 
Looking forward for your guidance. 
 
Thank you
Regards
Sanjeet

Concatenation of multiple states into single state in state machine

$
0
0

Hello All,

I have a AVI Video file consisting of total 900 Frames and I divide the whole video into subsections according to the frame numbers. This is done by using state machine with 4 states where each state runs after selecting the corresponding boolean buttons  such as:

State 1: runs from 0-200

State 2: runs from 201-500

State 3: runs from 501-899

State 4 (default): runs from 0-899 (whole video file)

Next I have to concatenate states 1, 2 and 3 by clicking all the corresponding 3 boolean buttons such that it runs the whole video file ie. first runs the state 1,then statev2 and finally state 3. 

Can anyone suggest how to concatenate multiple cases in a state machine to get a single output by combing all those multiple states

NI 8473 failing after after 30 mins

$
0
0

Has anyone had the following problem or can anyone help:

 

I'm using

-labVIEW 8.5.1

-Ni-can 17

-Windows 10

 

When I start my application up the can bus is working fine I can set outputs and read inputs but then after a variable time I can no longer set outputs ( I can still read the inputs tough!!)

This is software I've inherited so am unclear about what they have written or is NI / third part etc but an error in the send outputs is:

BFF62008

NI-CAN write can network interface object ncWriteNet.vi

 

We also run this application (for our bigger systems ) on identical PCs etc but using the NI PCI-8512 card and have no issues

3D picture controll + CTRL + SHIFT keys

$
0
0

Hello dear LV users,

 

I am using 3d picture to display some data, by default when we press and move a mouse around the control it will rotate the camera, we can press CTRL or SHIFT to change that to zoom or move.

 

I will display data on a touchscreen and I want to have an option for the user to choose what to do, zoom, rotate or move.

Is there a programmatic way to do that? 

 

Last resort will be to try to use winapi and simulate keyboard inputs but I would like to avoid that.

Has anyone faced that problem? 

 

LabVIEW hangs at RunVI invoke node in Watlow f4t Driver

$
0
0

Hello everyone, 

 

I only just started using LabView a few weeks ago to automate some instrumentation and, generally speaking, I have found it pretty good. I've also spent some time lurking on these forums and have found some of the posts very informative, so hopefully some of you could offer me some helpful advice as well!

 

I have been trying to communicate (using Ethernet) with an Espec climate chamber (which uses a Watlow f4t controller) with their Labview driver, simply trying to perform the following commands for a given profile:

- Start (Param ID: 79014, write: 1782)

- Pause (Param ID: 79016, write: 146)

- Resume (Param ID: 79015, write: 147)

- Terminate (Param ID: 79016, write: 148)

 

The driver essentially only provides 4 blocks to work with: initialize, read, write, and close. Using the write block, I can perform any of those 4 functions (start, pause, resume, or terminate) exactly once before LabView locks up. If I send the "Start" command, for example, profile 1 of the chamber begins as expected but all of LabView freezes; I am forced to use Task Manager in order to shut down the application (LabView's Abort Execution function does not work). 

 

Using the Highlight Execution function, it looks like the program stops at the following blocks within std_bus_write.vi:watlow error.png

 

 

As I've already explained, I am a novice with LabView; could anyone explain to me why these blocks may never finish execution? I've tried running the write call asynchronously (code attached, ignore the messy lines), to see if I could hack around the problem. But I basically ended up with the same issue. 

 

Thanks in advance for your help!!

 

PS - If I've posted in the wrong forum, sorry about that! Please just let me know where this should be posted.


Error 5103 - 7220002

$
0
0

Hello,

 

I have got this error for a first time. I dont really know how to solve it.

 

I sm using NI cDAQ - 9188  + NI9215. Reading singnal from Conditioning Module

one signal is from Load cell and  enother one from LVDT.

 

Reading singnals from one module could cause this error.

 

I have read info about on NI website - non of their solution seem to be applicable for my application.

 

Many Thanks

 

Gregorian

PICAM SDK, Call Library Function, crashes LV

$
0
0

Hello,

I have very tiny (zero) experience with external DLL calls. I try to use a SDK called PICAM to interface a Princeton Instr. camera (driver installed successfully under Win7, x64) from LabVIEW.

I attach the SDK manual, and also the public header file.

I started to develop step by step and test some basic VIs. So far the library init/uninit, and the Camera_open/close functions seem to work (no error response).

 

However, the next step would be to call the "int32_t Picam_GetCameraID(uint32_t camera, void *id);" function. I got this function prototype from an unfinished LV project I inherited from an ex-colleague. I have the strong feeling, that the function prototype / data types are not OK, so thus I get LV crash when I call this particular function. I try to figure out from the manual, how to properly pass/get data types to/from LV. No success so far Smiley Sad

Someone could give me some hints please?

(the DLL import wizard did not work, complaint about many type mismatches).

I also attach some more files (the lvlib i have so far, the header file, and the manual), they might help you to help me faster. If you need any more info, just write me please!

Thanks very much, I am really stuck with this project now! Smiley Happy

 

Using buttons from the Project Explorer and other LV windows in our own projects

$
0
0

I'm looking to implement some system style icons in my project. I have the System Controls 2.0 suite installed but it doesn't have quite what all I want in it meaning I need text as well as buttons. Unfortunately the button icons aren't justified with text, so if the text is 2 rows or is too wide, the icon is no longer centered.

 

I happened to notice that the Project Explorer window and the standard LabVIEW interface have a few buttons in them that would work well for several of my projects, leading me to a couple of questions- first, are these icon buttons available anywhere, and if so, can we distribute them with LabVIEW programs we write?

 

For example, the "New..." icon with the little star and a piece of paper from the Project Manager is something I could use frequently, but it's not available in any pallettes I can find.

 

If the buttons exist somewhere in my LabVIEW installation directory I'd love to know where Smiley Happy

Reduce vibration

$
0
0

Good Evening All,

 

I am looking at reducing the overall vibration in a wildcat helicopter for my university course. Obviously due to the cost i am unable to utilise a real life wildcat so am looking to use a radio controlled helicopter to prove my concept works.

 

I need to measure the phase of the main rotor head so i can then ensure the dc motor i will use as a "shaker" will be 180 degrees out of phase.

 

Due to the size of the RC helicopter i am unable to use an accelerometer to pick off the required information.

 

My question is what component would be best to use and is this even feasible?

Thank you in advance for your expert opinion and input,

 

Best regards,

 

Mark Sheldon.

Compare performance of vis

$
0
0

Hi,

I am trying to determine which of these vis need least time. Which needs the least memory. I tried to compare them using Profile performance and Memory tool. But I get 

exactly the same time of execution. Please advice what would be the best way of doing this.

Thank you.

Can I get rid of the Robotics watermark on the diagram?

$
0
0

I was having frequent crashes of LV 2015, so I uninstalled and reinstalled. (The crashes are still happening...) As I did the first time, I chose to install the Robotics toolkit. Previously, this added the word "Robotics" to the splash screen when LV is started (as well as pallettes, etc.) But this time, there is also a big gear "robotics" watermark on every block diagram. I've never seen this before. It is hugely annoying and distracting. I've done a search and can't even find mention of it. Does anyone know if there is a way to get rid of it?


TIA,

     DaveT

Controlling A Case Structure with String Numbers.

$
0
0

Hello all.

 

I'm trying to use 5 digit string numbers as they come out of a Visa Read, to control my case selector for the case corresponding to the frequency. There will be numbers that don't have a case, but I want to include these in the case panel.

 

According to what I could read about it, in order to use case 00050 for all the numbers up to the next case (00950), I would make the first label say "00050..000950" (no spaces).  If I did this to all the cases the test LED's representing each case would systematically turn on at the lower case until the number reached the next case and turn off, followed by that cases LED turning on and so on up the ladder. (This is the case in the middle with all the test LED's connected to it.)

 

 

Labview block.pngWhen I did this, instead of just getting a test blink only on the 00050 freq case, and every other frequency case, all the test led's stopped. 


Configuring time stamps for writing waveform data to text file?

$
0
0

I prefer to avoid using Express VI's if I can help it. I discovered recently, through reading the forums, that the Write To Measurement File Express VI prevents the user from configuring the digits of precision in the output file, fixing them at 6. I have rewritten my VI, in an effort to use lower level file I/O to circumvent this issue. While I now see all the digits of precision my cDAQ modules can muster, I am unable to configure the time stamp such that t0 is set to 00:00:00. I want a single time column with the correct dt increment, starting at 00:00:00.000000. Is there a way to do this easily, within the existing structure of the my VI? Thank you all for your help!

 

I am using LabVIEW 2017 v17.0f2

Open VI refs in parallel: possible?

$
0
0

I have a VI that loads a VI reference by path. When called serially it takes about 10s to load twenty of so VIs in my input array of VI paths.

 

In an attempt to speed this up, I tried to parallelize this VI by making it re-entrant and doing an asynchronous call and collect. However, I'm seeing only a modest speed improvement. I'm wondering if the Open VI Ref primitive is essentially non-re-entrant and thus non parallelizable. Nothing else in the called VI takes a significant amount of time.

Alternative cursor legend controls

$
0
0

I wanted to be able to programmatically move waveform and XY graph cursor legends so that my users can move the legend out of the way when they plot data.  I provide this for the plot legend and it works great since I don't want the legends taking up space outside the plot area.

 

Alas, for some odd reason, LabView simply doesn't allow it.  There are no properties exposed for interacting with the cursor legend.  Ideas have made it to the exchange, but those were declined due to lack of interest.

 

There are workarounds like:

 

https://forums.ni.com/t5/Example-Programs/Moving-a-Graph-Cursor-Legend-Programmatically/ta-p/3502530

 

But this is at the expense of the functionality of the built in cursor legend control.  So, are there alternatives to the cursor legend control that mimic the functionality of that control while providing property based interaction?  Or is there any hidden way to control the position and vertical size that has evaded my Google searches?

 

Thanks,


XL600

what is the optimum system requirements for LabVIEW?

$
0
0
  1. This whitepaper here tells me that the below are the requirements, but I believe this is the minimum system requirements. But what are the optimum system requirements, because from my past experience with LabVIEW, I know its a RAM hogger. Planning to put in an order for a dell workstation, would that be sufficient ?
  2. Is it Ok to install the 32-bit version of LabVIEW 2017 since the white paper says LabVIEW 2017 (64-bit) supports a limited number of modules and toolkits. Or should I wait for 2018 release ?

Windows

 

 

 

Run-Time Engine

Development Environment

Processor

Pentium 4M/Celeron 866 MHz (or equivalent) or later (32-bit)

Pentium 4 G1 (or equivalent) or later (64-bit)

Pentium 4M (or equivalent) or later (32-bit)

Pentium 4 G1 (or equivalent) or later (64-bit)

RAM

256 MB

1 GB

Screen Resolution

1024 x 768 pixels

1024 x 768 pixels

OS

Windows 10/8.1/8/7 SP1 (32- and 64-bit)
Windows Server 2012 R2 (64-bit)
Windows Server 2008 R2 SP1 (64-bit)

Windows 10/8.1/8/7 SP1 (32- and 64-bit)
Windows Server 2012 R2 (64-bit)
Windows Server 2008 R2 SP1 (64-bit)

Disk Space

620 MB

5 GB (includes default drivers
from NI Device Drivers DVD)

Retrieve USB device location information (port # and hub #)

$
0
0

How in LabVIEW can you retrieve the USB device's location information - its port # and hub #? Pulling up the device properties from Windows' Device Manager shows the Location along with the Device Type and Manufacturer. See the attached screenshot.

 

Thanks in advance!

Viewing all 68930 articles
Browse latest View live


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