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

Problem to open communication with FT260

$
0
0

Hi,

 

I have a an FT260 IC and use the functions of the LibFT260.dll library

 

When i try to open a communication with it, the relative function return me the STATUS:  "Device not Found".

 

I am using Windows XP 32 bit as O.S.

Obviously, the device is recognized from my O.S.

The parameters of the function are correct. The prototype of the function is followed:

 

FT260_STATUSFT260_OpenByVidPid(WORD vid, WORD pid, DWORD deviceIndex, FT260_HANDLE* pFt260Handle)

 

FT260_STATUS is an enum that i defined it as uint8 enum in labview

 

This is how I configured the CLFN:

 

uint8_tFT260_OpenByVidPid@16(uint16_t Vid, uint16_t Pid, uint32_t DeviceIndex, uint32_t* SessionID)

Convenction call is: stdcall (WINAPI)

 

Can someone help me to understand what is the problem?

 

Thank you very much


Leer encoder con Laview y LINX

Temperature control of a specimen inside a temperature chamber

$
0
0

Hello,

 

I have a thermal chamber that I'm controlling with serial Modbus. The only thing I can control is air temperature inside the chamber and gradient. On the other side I have some thermocouples measuring the temperature of the specimen inside the chamber. I would like to control the temperature of the specimen with labview.

 

I know I need to do a cascada control. The first PID would be the difference between the desired specimen setpoint - specimen temperature. The thing is I don't know how to "convert"/"relate" temperature of the specimen with air temperature inside the chamber.

Convection formula is : E=h*A(Tair-Tspecimen), this formula could relate Tair and Tspecimen--> Tair = (E/h*A)+Tspecimen... but I don't know "E".

 

Someone has worked with something similar in labview and knows how to solve this?

Anyone trying Reinforcement Learning (RL) in LabVIEW?

$
0
0

Hi Folks,

 

I am studying Reinforcement Learning and Markov Decision Processes for an application. I was wondering if there were LabVIEW libraries or examples of this kind of optimization.


Thanks!

Writing C code in LabVIEW

$
0
0

Is there any workaround to write C code in the block diagram of LabVIEW? I know that I can call an already written C code, however, I wonder if it is somehow possible to write the C code inside LabVIEW block diagram?
I tried the C generator module, but I failed to write and compile any C code. Also, I even failed to generate C code from any LabVIEW code! 

A more efficient lookup table for numeric data?

$
0
0

Hi All,

 

I've attached a VI that interpolates a data set and then uses the 'Search 1D Array' function to obtain a value for the corresponding value in the interpolated data.

 

When slotting this VI in my overarching code, it seems to become considerably less responsive at smaller time-steps. After looking up online for more efficient methods of implementing look-up tables, it suggested using variant attributes. However, the post I read suggested that this can only be done for string data inputs.

 

Is there a more efficient way of doing this? And if variant attributes would work, could somebody show me how?

 

Any help would be amazing.

 

Thanks,

Chango 

Bug when using unit labels inside of array

$
0
0

I believe there is a bug that is causing the labview front panel UI to no longer show  drop down lists, whether it be a ring, enum, or the the file-edit-view menus from the menu bar.

If you have a cluster that is part of an array and one of the cluster controls is set to display in "SI Notation" with a visible unit label, once you edit one of the unit label controls in the array of clusters then all the drop down lists become invisible. This happens while editing or running the VI. You can still guess and select a value, but it makes the entire front panel essentially unusable until the VI is closed and restarted. Even trying to save via "ctl+s" sometimes works sometimes hangs indefinitely once in the funky state.

If i disable the unit labels then this behavior seems to go away.

The attached LV2017-VI repeatably exhibits this behavior in a win 10 environment when the start or stop frequency fields in the cluster array are changed and set to display in "SI" notation with unit labels.

Reading an analogue signal using MYRIO

$
0
0

Hi, i am trying to read an analogue signal from an LM35 temperature sensor using the MYRIO. the sensor is connected to 5V, Analogue ground and AI0 on the B block of the MYRIO. i am attempting to read the signal from an FPGA  and set the sampling rate and number of samples. i am doing this from the picture below. In the real time VI i convert the data from the input into a voltage and then change to a temperature reading, but on the graph it is not displayed correctly it seems to be reading the desired temperature then constantly going to zero. any help in resolving this issue would be greatly appreciated

FPGA.PNG

Reading signal.PNGCapture.PNG


Programmatic way to get data from queue and place into 2D array

$
0
0

Is there a better way to do this, or what I am really trying to figure out if there is a programmatic way to do this. 

 

There are 30 items in the queue, each item is a 1D array contains 200 elements. Currently there are three channels in the program, but this code will be used in other programs with varying channels (hopefully user selectable), and it sure seems like there is a cleaner way to do this. 

 

[img]https://live.staticflickr.com/65535/32899261117_0fe0368c4d_b.jpg[/img]

 

Thanks!

Problem with simultaneous PWM with NI-9041

$
0
0

Hello everyone,

I'm running a very very simple vi with 4 PWM that are being sent through a NI9401 module to a PCB.

I'm using the DIO channels 0 to 3.

I'm simply using 4 numeric controls on the front panel to be able to independently control the Duty Cycle of the PWM signals.

Now, when I set the DC of channel 0 to 50%, all is good, the PWM is correctly displayed in my oscilloscope. But, when I set the DC of channel 1 to something like 30%, this PWM signals also is being displayed with a 50% DC in the oscilloscope.

Now, for another experiment:
Set channel 1 to 0%
Set channel 2 to 40%
Increase in 10% steps the channel 1 from 0 to 100...

When I do that, the channel 2 stays at 40% before the channel 1 reaches that value as well, but as soon as channel 1 goes beyond this duty cycle, the channel 2 will lock onto the same duty cycle as channel 1, I don't know why is this happening, these 4 pwm signals are not connected in any way whatsoever.

 

Please help me out

Problem with simultaneous PWM with NI-9041 module

$
0
0

Hello everyone,

I'm running a very very simple vi with 4 PWM that are being sent through a NI9401 module to a PCB.

I'm using the DIO channels 0 to 3.

I'm simply using 4 numeric controls on the front panel to be able to independently control the Duty Cycle of the PWM signals.

Now, when I set the DC of channel 0 to 50%, all is good, the PWM is correctly displayed in my oscilloscope. But, when I set the DC of channel 1 to something like 30%, this PWM signals also is being displayed with a 50% DC in the oscilloscope.

Now, for another experiment:
Set channel 1 to 0%
Set channel 2 to 40%
Increase in 10% steps the channel 1 from 0 to 100...

When I do that, the channel 2 stays at 40% before the channel 1 reaches that value as well, but as soon as channel 1 goes beyond this duty cycle, the channel 2 will lock onto the same duty cycle as channel 1, I don't know why is this happening, these 4 pwm signals are not connected in any way whatsoever.

 

Please help me out

Reading a Tiff image with IMAQ ReadFile

$
0
0

I am trying to use 'IMAQ ReadFile' to read tiff images, which were recorded with a camera-link camera and a function library from the camera company.

 

The tiff image recorded with the camera is shown circularly shifted when opened with  'IMAQ ReadFile'. 

 

- This vi can open other tiff images correctly, so I can say the vi works in general.

- The tiff file is shown correctly when opened with other image viewers, e.g., ImageJ.

 

My guess is that the tiff file was saved with some options, which are not fully compatible with the ones used by 'IMAQ ReadFile'. Has anyone have this problem before?

 

PS. The vi to read the image and an example tiff file recorded with the camera (shown to be circularly shifted when opened with the attached vi) are attached.

 

 

 

Update FP Status Indicator by unique ID

$
0
0

Hi All,

Let's say I have N DUTs running tests in parallel, and I have corresponding N String Indicators for each DUT.  How can I dynamically update each DUT status to its respective Status Indicator?

I have done something like this:

FP_Ref_Test.png

FP.png 

This way, depending on the DUT ID, it will assign the correct "Status Text" to the Status Indicator by matching Label.Text.  I was wondering if there is a better way of doing this?

 

Best Regards,

Mikejj

Menu Offset bug?

$
0
0

Just wondering if anyone has seen this issue before in LabVIEW 2017, and if they have how to fix it? This is a strange problem where sometimes, (the problem seems to come and go randomly) you select a menu option, in the included image I am selecting the "File" menu, and the menu itself appear but very offset from where it is supposed to be. When the screen is in full screen mode, it is actually off the screen entirely where you cannot see it. Very annoying. Thanks...

 

Using stop button boolean in case structure

$
0
0

Hello all,

 

I'd like to use the boolean from pressing "Stop" in an inner loop to execute some code inside a case structure. My issue is that the button always sends true (I tried with and without negation).

 

When the case structure does receive false, I'd like to execute some code and send constant true to break statements within the current loop. My problem here is that the loop breaks without ever executing the code in the case structure.

 

Any feedback is much appreciated.

 

Thank you.


I want to display "0.2m" but automatically converted to "200u"

$
0
0

Hi, on numeric control, I configured display format as "SI".

"0.2m" is forced to "200u". I don't need the feature. I want to display "0.2m" as "0.2m".

"1.2m" is not forced..... Ummm

 

Does anyone have good idea? (Sorry but I don't want to develop Xcontrol)

 

image.PNG

Please don't make the display "200.00u" : (

 

How to pass on each output value of FOR loop onto a case structure ?

$
0
0

Hi,

 

I am using a for loop to generate some numbers each of which I want to be an input for another block of code. However, while executing, only the value from the final iteration step is getting passed on. I would be glad to know about ways of fixing this problem. Thanks.

How to get Elapsed Timer working in Message Queue(Event-Message Handling Loop)

$
0
0

Hi All,

Good day. Beginner here. I have been developing a LabVIEW code for Pressure Drop project. I am using a relay to control the valve

and motor(switching it on and off). 

 

I am using Event-Message Handling loop as an example shown from attached screenshot. I can control switching ON/OFF the boolean

controls. However, the Elapsed Timer I am using does not seem to work properly. 

I have been searching some forums here about making the Elapsed Time work, like adding a "Timeout" case from Event Handling loop and do the code from there, however tried it but still does not seem to work properly or maybe I just don't know how to code it properly. :-)

 

If someone can help me suggest the better or simpler way on how to get timing working on specific boolean(to switch ON/OFF) using Event-Message Handling loop then it would be great.

 

I have tried Flat Sequence structure, and the Elapsed Timer seems to work ok without any issues within my code.

 

Thanks for your help in advance.

 

Cheers!

StayHappy

Help on : Allow default Run-Time shortcut menus

$
0
0

While customizing the FP, I have never been able to understand the function of this menu option.. what exactly is a Default run time short cut menu ? ( This is one instance where LV Help is not helping me ;-)

 

Thanks

Recursive VIs

$
0
0

Not sure if  already addressed somewhere

Take a  recursive VI (call  it a.vi)  to a desktop(any version of Windows) where  LV  not installed  at all. Copy  a.vi to b.vi. Take  b.vi to a computer where LV  installed and run

 

I expected b.vi to look for a.vi. However,  b.vi run did  not expect a.vi.  

 

How exactly Windows OS interfering in internals of an VI?

 

If this is  the expected and correct  way of VI working, why LV NG(NextGen) not following this?

Viewing all 66729 articles
Browse latest View live


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