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

Not able to press Tab in Web Page with help of IWebBrowser2

$
0
0

Hello,

 

I would like to press the tab on a web page tab that doesn´t have a direct URL. I read somewhere that ths could be achieved with the Navigate2 method in IWebBrowser2. Unfortunately I am not so good with HTML language. I have use Google Chromes Inspect function to try to get a comnmand to the web tab. See attachments. It is the "Line-ups" tab i want to press programmatically on.

 

Other possible solutions I have read about is with the click method on the web element but I have also failed trying that.

 

Any suggestions are apreciated. Thanks in advance.


Syncing the start of N-Sample/N-Frame captures via Express VIs?

$
0
0

Hello wonderful folks in NI LV Land!

 

I'm running into a bit of a challenge with syncing. After a week of looking at examples, reading manuals, and trying to work through this myself, I'm not yet collapsing on a solution path. And here we are! Maybe someone here has a great insight that can get me moving again?

 

What am I trying to accomplish?(for context)

I work at a fitness center and have been building an application to run a force plate. When people jump on the force plate, the application outputs force and hang time and jump height and other [interesting] data points. The personal trainers then use this information to help with training programs. Force plate waveforms from a jump (countermovement jump) can sometimes be confusing to the new eye - I thought it would be useful to implement a video capture with the jump. I purchased IMAQdx and a Basler camera and got started. 

 

What have I tried?

Initially I was way overthinking it - trying to start DAQmx captures, writing chunks of data to an array while running frame by frame captures in For Loops... but ran into challenges with the Data side b/c I needed very specific capture rates and also needed multiple channels with some Voltage to Force conversions done on them. I looked at every example I could find online - learned little bits here and there, but my use case required more. It was getting very complicated. I did find several solutions with the full blown Vision package, but don't have funds to purchase that - so I've been working with what I have to make it happen.

 

I took a step back and realized that I really just need a "pretty close" match (for instructional purposes only) of a side by side 5 second 120 frames per second AVI and a 5 second capture @5k samples/sec. It didn't need to be anything fancy - so I went back to simple - no fancy playbacks or other things. Using the DAQ Assitant and the Vision Aquisition Express VIs got me around several of the issues I was previously encountering and it became easy to then tie cursor position of the graph to the frame count on the AVI (via propery nodes). Put in some scaling math and 5 seconds of video is tied to 5 seconds of data capture. See attached for my current prototype (I try to build a functional VI before implementing into my bigger project). Don't mind all the Image Out instances - I've been trying lots of things to see how it impacts the application function. Additionally - in the bigger picture, I plan to make this application into one that will let the user open a data file and an AVI file and scroll/scrub the AVI file with the cursor linked to that motion on the data. I've built a prototype of this, but there is still the problem of needing the two data sources to capture at "nearly" the same time. 

 

BTW - I've only been using Labview for about 8 months on and off, so I'm by no means experienced at any of this - just learning by doing as often as I can. And this work is being done in Labview 14 on a PXI chasis. 

 

Current Challenge...

When I run this current prototype VI, the DAQ and Vision VIs start at different times. Scrubbing the capture shows a delay of about 3/4 sec with the AVI being the lagger. I've looked into many syncing options/ forum posts, and examples such as Rendezvous with SubVIs.vi - with no luck. I've considered putting in a delay to offset the time delta, but that feels wrong to me. I've considered allowing the user to find a "tare" position and lock the two from that point (not the best experience)... so now I'm wondering if it's a Labview thing - a limitation of Express VIs - but I'm probably just doing something wrong. Hear me out: The "N-Sample" DAQ Assitant data can execute without a loop and the Express VI just outputs the 5 second data capture from all the channels I want (and I can run some math between the output and graph if needed) --- BUT the Vision Aquisition needs a For Loop with the frame count of an "N-Sample" capture. When I Highlight Execution - the Vision Aquisition is still capturing after the DAQ assitant has finished, which confirms what I'm seeing on the Front Panel with the Image Output lagging the Graph by about 3/4 sec. I'm unfamiliar with and could not find information (maybe I'm not using the correct terminology) on how to sync things that are happening inside and outside of loops - such that they start at the roughly the same time (within ~50ms?) and capture roughly the same 5 second event (the person jumping).

 

Any ideas? Thoughts? Things I could read or try Examples I may be missing? In my gut this seems like it should be simple, but that probably inexperience talking.

 

Thank you in advance,

Brandon

Tip Strip Collision in the top right corner

$
0
0

Beyond-minor annoyance which I suspect is a Windows thing more than a LabVIEW one, but it is possible to obtain two simultaneous tip strips if you get the pointer on the close box of a window (I suppose this also works for minimize and maximize) and the pointer also happens to spill over a panel control with tip strip enabled:

 

Screen Shot 2016-08-28 at 11.49.00.png

 

My screen capture is not set to display the pointer, but it is the usual Windows arrow and it is located pretty much in the center of the close box.

I also realized that you don't need to bring the cursor over the box, but simply on the window bar below the box to have it highlight and spit a tip strip, which does get in the way:

Screen Shot 2016-08-28 at 11.59.36.png

There doesn't seem to be such a problem with controls themselves: if there are two very close controls on the FP, as long as the tip of the pointer is on a given control, it doesn't matter if the arrow spills over another control. Only the tip strip of the first control is shown.

 

 

Tested on Windows 7. Does it survive the upgrade to newer Windows versions?

problem to open and abort a subvi by invoke node

$
0
0

Hello,

I have a subvi that is runing in a while loop and it is doing calculation that finish in a variable time. So I decided to add the abort function in invoke node. It is working perfectly when the subvi is running by its own but gives an error.

Error 1000 occurred at Open VI Reference
Possible Reason(s): LabVIEW: The VI is not in a state compatible with this operation.

I found that there is a solution for that in the follwing link.

http://digital.ni.com/public.nsf/allkb/790AC75B07D971ED86256C53007BDCE9

So I added the Run Vi invoke node in the main vi and abort VI invoke node in the subvi

as in the following snippet but I still get the same error. What do you think I am missing?

s1.png

s2.png

Graph with multiple Y scales

$
0
0

Hello,

As you can see in the snippet, I am trying to plot a Graph with multiple Y scales. What do you think is wrong with it to get the following error.

s3.png

Possible reason(s):

LabVIEW:  Invalid property value.

data flow problem in case structures (using a state machine)

$
0
0

Good day everyone.

I am having a problem with data flow between case structures.

I am trying to use a state machine example for this simple problem. but when I try to send data from one case structure to change the state of the code. It won't change to desirable output, instead it gives the option as the output from the emul options.

could someone please point out what am I doing wrong here. Any kind of help would be highly appreciated.

one matrix subtracted by another gives a scalar?

$
0
0

Hi,

I am implementing an algorithm, Recursive Least Squares Method. Something went wrong with matrix subtraction. That node lays below the context help gives a scalar. It should be a matrix, anyway.

1.jpg

How can I fix it?

 

Thanks in advance.

 

Chuan

Visa serial comm (use event ) problem at loopback but virtual port OK

$
0
0

I am new to Labview!

I build a Vi to perform serial comm to test the visa info.

First, I test this vi at virtual ports ,comm1 for serial program, comm 2 for this vi,one for transmission and one for receiving. OK!

but when I use it at single Comm3 (Prolific USB serial port,MAX's view is OK) and loopback ,I got

Error -1073807298!

 

I Don't figure out what's the problem, Could Give me some advice? Thanks!


Matrix subtraction

$
0
0

Hi, 

I am trying to do a subtraction with two matrices. Why does this refuse to work?2.jpg

Chuan

DLL Wrapper doesn't succeed to call a DLL function

$
0
0

Hi,

I'm currently interfacing an optris camera with Labview. My program work well, for now. I'm actually trying to use an external signal to trigger a snapshot (electric circuit link to the camera). For that I need to use a fonction of the dll given by Optris (ImagerIPC2.dll), its name is GetFrame, here  is it's definition on the header :

 

IMAGERIPC_API HRESULT WINAPI GetFrame(WORD index, WORD timeout, void *pBuf, unsigned int  Size, FrameMetadata *pMetadata);

 

with pMetadata define as :

struct FrameMetadata

{

    unsigned short Size;    // size of this structure

    unsigned int Counter;    // frame counter

    unsigned int CounterHW;    // frame counter hardware

    long long Timestamp;    // time stamp in UNITS (10000000 per second)

    long long TimestampMedia;

    TFlagState FlagState;

    float TempChip;

    float TempFlag;

    float TempBox;

    WORD PIFin[2];           

    // DI = PIFin[0] & 0x8000

    // AI1 = PIFin[0] & 0x03FF

    // AI2 = PIFin[1] & 0x03FF

};

 

As you can easily understand, Labview really don't understand the metada struct. So I am trying to do a wrapper dll to just obtain the information that I need ( underlined on the struct : WORD PIFin[0] in order to have the digital input). So I already did it  (see in attached file),  it's the function : PIFvalue; the two others were to test my dll. So now is my problem :

 

My dll work because i can use my function add. But when i try to use PIFvalue, I don't succeed to call correctly the function getFrame so at the end *pif= NULL and i don't have what i expect. I don't use to do dll wrapper, so my way to call the function or to use it may be wrong!

Have you a better way to call the function? or may be a correction for my program?

 

Thanks by advance for your help,

Alexandre Blouin.

PS : I don't join the dll ImagerIPC2.dll because you need the camera in order to use it.

FGEN NI-PXI 5402 1MHz varying duty cycles

$
0
0

Hi,

 

I am trying to generate a 1MHz pulse train with a varying duty cycle on the FGEN NI-PXI 5402.

 

Does anyone have an idea on how I will go about doing this.

 

Regards,

Modification in astar algorithm for path finding

$
0
0
Hello everyone
I want to make a program which provide path for robot in arena
The arena is a square grid.
I referred example in Labview which provides shortest path using astar algorithm. But it provide path diagonally. I want to move my robot only forward backward left and right.
It shouldn't move diagonally
So pls provide me modification i have to make in programming so that it won't give me path diagonally
Thank you

Problem to use DAQ, NI 6501

$
0
0

Hello,

 

I have a problem whit use NI 6501 and DAQ

I read data to a file and I separate the bit, and this is ok. I wuold write to Port 0 a signal and read the seame whit Port 1 but don't work.

 

Thx

 

Relay timing

$
0
0

Hey guys,

 

I have  build a small program to control 8 relays on a conrad relay card. 

Individual relays are controlled by sending commands with 19200 Baud without handshake signals, 8 data bits, without parity bit and with one stop bit. 

The programs shown works perfectly if individual relays need to switched on/off.

Now i would like to add a timing function i.e. controlling the timing of individual relays based on user input. 

Any suggestions on how to go about it would be appreciated.

Thanks 

LabVIEW 7.1 application at Windows 7 has problem to find the USB device.

$
0
0

Hello,

I have generated an executable with LabVIEW 7.1 including NI-VISA runtime and LabVIEW run-time environment.

I have tried to run the application at Windows 7 and it now has problem to find the USB device that we have developed.

The device is correctly connected to the computer as it shows that it received a com-port.

 I’m very concerned because it looks like the LabVIEW version 7.1 that we used will not be able to build an executable that is compatible to windows 7 and beyond because of incompatible NI-VISA run-time environment

 

I found the following overview at NI website:

 

NI-VISA and LabVIEW Compatibility.png

 

I also found the following comment somewhere on the NI forum:

“The latest version of VISA does not support LabVIEW 7. The earliest version of NI-VISA that supports Windows 7 is 4.6, and that does not support LabVIEW 7. You need to either upgrade LabVIEW or use an older OS.”

 

Is this really the only solution or is there may be another possibility to solve by tweaking Smiley Happy

An upgrade for LabVIEW is much too expensive for me at the moment Smiley Sad

Actually, I also have LabView 8.6.1 available and already installed at other computer. Unfortunately for this version I have no application builder activated.

I have tried to find how to activate for application builder for LabVIEW version 8.6.1. , but I have difficulties to find if it is still possible to get an activation code and what will it cost.

 

Is there someone who now a tweak to make 7.1 executable to work with USB device at windows 7, or how to get activation code for application builder for Labview 8.6.1 and what will it cost.

 

Thank you.


Shared reentrant VI uses static registration of application event

$
0
0

I'm upgrading a project from LV2011 to LV2014 and have hit a snag. I've got a reentrant VI that is throwing an error for statically registered application events. Is this a bug when upgrading from 2011 to 2014? The execution options are different between the two versions. Is this possibly a bug when upgrading?

 

Reentrant error.PNG

Unable to delete one row from Database

$
0
0

Hello Labview Wizards,

 

I'm currently trying to implement a delete one row function in my VI, but have been unable to successfully do so.

 

Background Info: Using postgreSQL

Database: 3 columns (user, password, privilege)

2 entries: first entry: (alex, 123, 123) second entry: (mike, 456, 456)

Problem: When i specify to delete entry 'mike' nothing happens. However when i specify delete entry 'alex', it deletes both. What am i doing wrong?

 

I have searched the forums for my inquiry, and found one related at this link: http://forums.ni.com/t5/LabVIEW/how-to-remove-only-one-row-from-the-database-using-labview6-1/td-p/151840

In addition, i did reading on the delete statement from SQL.

I used the code that the user Johan provided (see attached image), modifying it for my database to further test whether delete was working or not. The problem persists using the code that Johan provided. In summation, I tried to delete in my original VI, then tried in a simplified VI, then Johan's code, and they all acted the same way.

ActiveX Then and Now

$
0
0

Hello All,

I have attached two snippets.  'Old ActiveX' is from and older version of LabVIEW using a password-locked callback function.  'New ActiveX is what I want to use in my current build.I am confused at a higher level as to the methodology of using the updated nodes.

As always, help is appreciated.

Thanks,

Chris

Converting to dynamic data

$
0
0

Hey friends, 

I got stucked with one issue of my NI 9242 module. I am building the testbed for synchronous generator and I need to connect it to the grid. For that I need to now the phase difference between grid and generator. At the moment I don't have all the components, so I am simulating signals. To perform this task I would like to use an "Extract Single Tone Information.vi", but the thing is it excepts only dynamic data. I was trying to convert the data I acquire with NI 9242 to an array using While Loop (and before a For Loop), but somehow my array is filled with the same number. The FPGA works with time delay of 1ms between events. 

I don't understand why it happens, so every reply would be helpful. 

 

 

VISA slows down

$
0
0

Hello everyone,

 

Right now I am trying to use a VISA that before seemed to work fine, but as I increased the cycles in my main program, it seems to slow down sometimes, giving an error. Basically it controls a motor. I first send data to tell how much to move the motor with the X-move.vi and then I keep checking the position with the VI GetPosition.vi until it reaches the expected value.

But sometimes the first VI takes longer and gives an error, that makes the following VI to say it is in the position "0".

I believe it might be a problem about memory, but I don't know anymore what to try.

 

Could you please give me some help?

Thank you!

Viewing all 66762 articles
Browse latest View live


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