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

Value (signalling) between while loops?

$
0
0

Hello,

I'm stuggling to get two parallel while loops to talk to each other.  I'm writing a VI to control the motion of a thorlabs rotation stage while simultaneously reading in an analog input on a LabJack.  I want to trigger an event when the analog input drops below or rises above a threshold voltage.  The top loop contains the event structure; the bottom loop is monitoring the LabJack input.

code_snip.JPG

However, I cannot get the my event structure to notice when the threshold is crossed (a value change in 'move next indicator'). I tried using the value (signalling)  property node- but this triggers the event with each iteration of the while loop regardless of whether or not there was actually a state change.

Any suggestions? How do I trigger an event based off of a Boolean value change?

 


How do you creat this in Labview

$
0
0

I'm pretty new to Labview & I'm wondering how to do this in labview. 

We are trying to measure EMG signals for different weights. In other words, we apply different resistance ( 2kg,3kg,4 kg) & we see if participant can push the bike pedal and a constant RPM. I'm trying to draw this Labview. I'm wondering how I can simiulate adding resistant and show it on labview. Is there a way to generate something similar in labview?

Labview crashed on Mac OS X Sierra: 'nextEventMatchingMask should only be called from the Main Thread!'

$
0
0

I use DAQmx15.0 on Mac OS X Sierra, and the function "DAQmxBaseCreateTask" causes crashes, and I got the following error message, and stack trace. Based on the trace I found that Labview tries to call "nextEventMatchingMask" in a background thread. So this seems to be a bug in NI DAQmx and Labview. Does anyone know any way to work around or fix it?

 

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffbcd88e7b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffd1973cad objc_exception_throw + 48
2 AppKit 0x00007fffbafab8b1 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4471
3 LabVIEW 15.0 Runtime 0x0000000103801b91 WEventAvail + 833
4 LabVIEW 15.0 Runtime 0x000000010359ba7e Exec + 1246
5 LabVIEW 15.0 Runtime 0x0000000103590f8a _Z16DoBackgroundExeci + 202
6 LabVIEW 15.0 Runtime 0x0000000103728e6a _ZN12BGAppTask_MG11HandleTasksEi + 138
7 LabVIEW 15.0 Runtime 0x0000000103719fe3 _ZN15BGAppTask_MacUI21CheckAndHandleBGEventEv + 51
8 LabVIEW 15.0 Runtime 0x000000010371cc6d _Z33BGAppTasksRunLoopObserverCallbackP19__CFRunLoopObservermPv + 301
9 CoreFoundation 0x00007fffbcd1e397 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
10 CoreFoundation 0x00007fffbcd1e307 __CFRunLoopDoObservers + 391
11 CoreFoundation 0x00007fffbccfef5a __CFRunLoopRun + 906
12 CoreFoundation 0x00007fffbccfe974 CFRunLoopRunSpecific + 420
13 LabVIEW 15.0 Runtime 0x0000000103718387 _ZN19MainLoop_MacCocoaUI3RunEv + 279
14 LabVIEW 15.0 Runtime 0x0000000102a83a46 _Z6MGMainiPKPKc + 294
15 LabVIEW 15.0 Runtime 0x0000000102a8450d _Z11SysUIThreadPv + 13
16 LabVIEW 15.0 Runtime 0x000000010387803e _Z15ThreadCoverProcPv + 94
17 libsystem_pthread.dylib 0x00007fffd246eaab _pthread_body + 180
18 libsystem_pthread.dylib 0x00007fffd246e9f7 _pthread_body + 0
19 libsystem_pthread.dylib 0x00007fffd246e1fd thread_start + 13
)

"VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."

$
0
0

Hello.

 

I buy new machine, which is "SPECTROMETER BIM-6001" made by brolight. Of cause, I receive the USB driver, but it's not working in Labview if I use it.

I solved this problem to use this document. -> http://www.ni.com/tutorial/4478/en/#

And I open the NI MAX, VISA test Panel. Of cause, Device is connected.

 

Now, it is problem.

First, I can't change the "Control Pipe" from Default (0).

Second, I enter basic I/O in Input/Output. I type command " *IND?\n ", push "Query" button. and I get return Data as following this.

------Return Data---------------

Read Operation

Error

 

VISA: (Hex 0xBFFF0015) Timeout expired before operation completed

--------------------------------------

"bytes to Read" is 1024.

 

 

I guess its problem is associated configuration.

I checked View Attributes, in Configuration panel, found strange thing.

 

Attribute                            |       Currnet Value

Bulk Out Pipe                   |       0x3

Bulk In Pipe                      |       0x81

Interrupt In Pipe                |       -1 (No Interrupt In Pipes Present

Interrupt In Pipe State       |      UNKNOWN

 

 

OS is windows 10. 

 

 

Happy new year,  greeting

Mattew

 

 

"Cannot generate library" error

$
0
0

Hi,

 

I'm trying to import a .dll file (written in c++) to labview. I had parsing problems during the import process but I solved them by including other header files. But after all the importing steps, it gives me an error says"Cannot generate library". I'm new to labview, could someone give me some suggestions on how to solve this problem please? Thank you.

Suitability of Labview Home Edition for Network Application

$
0
0

I am looking at a number of possible software solutions to help with an extended maker project I am working on and I came across the LabVIEW Home edition. The particular application I have in mind requires a SCADA-like operation of a number of devices and instruments that I have sitting on a network connection to my workshop. The core of the hardware operates on a couple of networkable smart relays and Raspberry PI's and the test instruments are a selection of devices some networked several that will be connected to a local PC and accessed via USB over TCP/IP. The USB devices will use a virtual machine architecture so they will appear as local devices for the purposes of control but the networked hardware is potentially more problematic.

 

I have not been able to track down any comprehensive or up to date list of drivers and devices supported by LabVIEW and my reading of the LabVIEW spec suggests that the Home edition is really only suitable for local applications with all network and data logging related applications requiring the LabVIEW DSC module. Do I have this right or is there a way to implement what I am after with the Home edition?

CSCRIPT ICE-1000 VBS

$
0
0

Hi,

I need to write a driver for the ICE-1000 to program a DSP. I have installed VisualDSP++ and I am using SAFP scripting.

 

When I run cscript.exe from the CMD prompt for example:

 

C:\Windows\SysWOW64\cscript.exe C:\programFlash.vbs --driver “C:\BF518FEzFlashDriver.dxe” --image “C:\SMS500_DSP_0v0.bin” –eraseAll --format 1

 

Then all works 100% and it programs the DSP with no problem.

 

But when I try and call this from Labview using the System Exec.vi then I get the following error:

 

"Microsoft Console Based Script Host has stopped working"

 

Any idea's what could be causing this? Is there another way to approch running a vbs script file from labview?

 

I have tried using wscript.exe rather then cscript.exe and I get the same result.

Timing issue (P/C design patern)

$
0
0

Hello eveyrone,

 

This post follows this one: Click here

 

I've had a lot of help and encouragments from the pervious thread that lead me to re-think my code into a more "efficient" one. The one I present here is not the best I can do I am sure, but I need it to work pretty soon (work requirement), and will enhance it through time. 

 

1) I've followed most of your advices and shrinked a little bit the loops (expect the 3rd one, but it will come)

2) Bob Schor is privately helping me a LOT! If by any way, Bob, you are reading this post: I am still in the process of enhancing my code with your help

3) the code itself: I want to aquire my data every 500ms (hence the timer on the dequeue element of the 2nd loop). My aquisition is done in the True case of this loop. What I'd like is to acquire a set of data every 1/2s, bundle it, and send it to the 3rd loop where it will be displayed and averaged every minute.

4) what it does: as you can see i've put indicators for displaying the iterations of my loops, and obviously my code doesn't iterate every 1/2s...

 

Is there a way where I could get closer to one iteration every 1/2s (or every 1s)? For a reason I ignore, my loops are slower than the set timer...

 

As I said, I am in the process of cleaning that code, and enhancing it, but I am obviously keen to take any critics about it.

 

(btw, this piece of code works properly right now: data are aquired, averaged, and saved, etc.).

 

Thank you  for you help,

Flo


cRIO Audio out over DVI

$
0
0

HI all,

 

We wish to send audio out from our DVI capable cRIO - 9030 and 9039 to

a speaker capable monitor over an HDMI cable.

 

Does the cRIO have a driver that can send audio over DVI.

 

thanks

Michael

connecting the output of one program to input of another

$
0
0

Hi Everyone, I have a confusion regarding how to connect the output the one program to another input of a program. I am able to run the code for the sick lms 100 laser scanner in the main block diagram. I have achieved distance  and angle using sick lms 100laser scanner. The diagram given below  (position of obstacle) represents the calculation step taken for calucating the position of point B ( AC,BC)= (8.6,5.0001)cm. Now,the major problem comes .

 

I have other program which is running on the main block diagram. Now, i want to put the output that is point B output which is (AC,BC) = (8.6, 5.001) into the (x,y ) coordinate of this program.Note that: These are two different programs which is not integrated yet. I just want to pass the ouput of (AC,BC) into my program for input (x,y).

 

can anyone help me?

[Unit Test Framework] Problem with array in result reports

$
0
0

Hello

I recently start to used the Unit Test Framework, and i encountered a simple problem in test result report.

The context is simple:
My VI uses a FOR loop. The output is the indexing output value of the FOR loop. So it is an array (1D).
So i've defined my test with the input values and the output array values (8 elements) . And i enable the report generation (HTML).
I ran it.

My problem is that on the test report, lists of output and expected values are truncated.
So when the test is failed, i cannot see which value(s) is(are) false.
I've joined a screenshot to show the report result.

 

Thanks for your help.

Labview example for TestStand Custom Type (editStep.vi)

$
0
0

Hi,

I am looking for a more recent version of the Labview code example you can find at the following URL, for creating Custom Step Types in TestStand:

http://www.ni.com/example/26078/en/

The zipped editStep.vi had been created using Labview 5.1.1 but it's too old and I can't open it with my oldest LV version IDE (8.5).

 

Any suggestion on:

- Where can I download a more recent version for this example
- How can I manage to open this VI? 

 

Thank you in advance,

Giovanni

Close program ordely

$
0
0

Hello to all.

I would like to know how I can close my program ordely.

I mean... I have 4 whiles in my program so when user clicks a "stop" botton close ordely: while 1 and when it is finished then close while 2 then close while 3....

How can I do that just with a stop botton?

Thanks a lot.

How to use RUN_TIME_ENGINE==TRUE ?

$
0
0

I thought RUN_TIME_ENGINE==TRUE in the conditional disable diagram means that the code inside will only run after compiled as an application. But it turns out that the code will also run when I simply run the VI. What am I missing here?

Turn Off NI Application Web Server

$
0
0

Our NI System Web Server service will not start and has the following error.  Any and all assistance would be helpful. 

 

Faulting application name: SystemWebServer.exe, version: 13.5.0.49152, time stamp: 0x52a7c230
Faulting module name: MSVCR90.dll, version: 9.0.30729.8387, time stamp: 0x51ea24a5
Exception code: 0x40000015
Fault offset: 0x0005beae
Faulting process id: 0x3970
Faulting application start time: 0x01d277da506eea85
Faulting application path: C:\Program Files (x86)\National Instruments\Shared\NI WebServer\SystemWebServer.exe
Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\MSVCR90.dll
Report Id: 8e287da8-e3cd-11e6-8104-00155d6abb00
Faulting package full name:
Faulting package-relative application ID:


Zero value readings every 30 minutes from watlow F4 via RS232

$
0
0

Hi Community,

 

I've been working on a watlow monitoring program for a chamber.

 

My labview program seems to be working fairly consistently except i'm running into a major problem every 30 or so minutes with the watflow drivers read.vi when i ask it to send me the temperature on analog input 1. 

 

The program simply uses the watlow f4 drivers for labview to take a reading of the thermocouple on the watlows analog input1 slot. 

Its working fine, but for some unknown reason, every 30mins or so, it retrieves a 0 degree reading

I configure the rs232 serial port with the baud rate on the watlow (19200). I know its working because its actually pulling the correct values 99% of the time, but I can't figure out why its reading 0 C every now and then.

I do have a 3s wait in my while loop because I don't want to overload the temp plot with a ton of values (and the PC i'm running this program on is just...slow and old)

 

is there something I should be configuring differently on the serial ports? i use the visa configure serial.vi and everythings left as default other than the baud rate and source..

 

any help would be appreciated

 

 

plug-in for PXIe-8108 lost after installing a new software

$
0
0

Hi everyone

 

I've currently installed a new software on my laptop and after rebooting the computer my program showed a warning regarding the PXIe-8108 controller - "the plugin for the ... controller is not installed on the computer or the license of the plug-in has expired."

Since there is no license missing I am wondering what may has happened to the plug-in...

 

Thanks a lot for supporting me :-).

 

cheers

Writing to Measurement File Logging Issue

$
0
0

I'm using the Write to Measurement File vi in a consumer loop in my main vi to log data. The first time I run the main vi after opening it, the data logs properly. However, in subsequent runs, my data is not logged. However, if I close my main vi and reopen it, the data logs properly.

 

In each run, I log to a differently named data file. I don't specifically close any files, but my assumption is that that is taken care of in the Write to Measurement File vi.

 

Any idea what might be going on/any potential fixes? I'm in LabVIEW 2014.

Choosing a port for a deployed web service

$
0
0

I am developing a web service based application that implements a RESTful interface to serve plot data to a web client.

I would like to serve the javascript based HTML5 front end from the same web server.

 

The tricky part is that I would like to server the html front end on port 80 but the web service back end on a different port, e.g. 8123. It seems to be industry best practice to not run a web service on port 80.

 

Any idea how I could to that and run both on the NI Application web server?

Labview 8.0, 8.2, and 8.2.1

$
0
0

I currently have a copy of labview 8.0, and 8.2, and a windows 10 64 bit laptop. We have one experiment setup (3 pieces of hardware) we want to use with this labview, but are having some issues. I believe these issues stem from the 64-bit operating system/installer. (When trying to install I get an error: "the windows installer engine is corrupt. to attempt to resolve this issue, please register the engine by running regsvr32.exe on msi.dll" I have already looked at posts on labview forums related to this error).

Namely, we can install labview 8.0 onto the system, but not labview 8.2. However, the .vi's from the company only work in labview 8.2. It appears there was an patch version of labview 8.2 called labview 8.2.1 that allowed it to be installed on 64-bit systems, but this is unvailable to me since I do not have a service membership.

What are my options? Is there another way to install labview 8.2 on my system? I am NOT proficient in labview, and this is my first time trying to use it, so I would not know how to create my own program for this equipment.

Thanks!


Viewing all 66969 articles
Browse latest View live