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

Import Shared Library Wizard doesn't understand wchar_t

$
0
0

I'm trying to import the shared library for the Microchip MCP2210 USB-to-SPI bridge chip.

The Import Shared Library Wizard can understand most of the header file, and creates most of the wrapper VIs.  But not all.

The problem is the Wizard doesn't understand the wchar_t data type.  It successfully imports all the functions that don't use wchar_t, and fails to import all the functions that do use wchar_t.

I know I need to type something into to preprocessing field of the Wizard to convert wchar_t to some data type that LabVIEW understands, but I can't figure it out, and I can't find any solutions in the knowledge base.  (Although there seems to be many people who have had similar problems.)

According to the docs from Microchip, wchar_t seems to be a 2-byte character.  For example, the function GetLibraryVersion uses "wchar_t  *version" to create a "pointer to a buffer string of 64 bytes (so it can accommodate max 30 wide characters)". 

I'd sure appreciate any help.  Thanks.


Serial communication - Labview Framework error

$
0
0

Getting a framework error, when I intentionally plug out the com port and plug back in. 

AFter manually playing around for a while inside the Device manager and removing and adding the VISA close vi, the application works.

 

Is there a way to get around this? Will post the vi if necessary. 

Rename Excel worksheets

$
0
0

Hello,

 

In the attached VI, I wanted to generate tab names based on data groups.  I have the Tab names in an array but need some help to get the names to appear on the Tabs.

Thanks.

LabVIEW 的 DataSocket 支援 https 嗎?

$
0
0

DataSocket_Error.jpg

 

如上圖所示

我想用 DataSocket 去讀取 https://www.icmdownload.com的資料

卻遇到有些電腦執行時會有錯誤的情況

有些電腦執行卻很正常

測試發現跟 OS 、LabVIEW 的版本也無關

似乎是少了某些套件

搜尋了官網論壇也沒有和我這問題類似或解決方式

不知各位是否有遇到這樣的情況?

該如何解決呢?

Read All Available Samples Property

$
0
0

When I use this property to do a finite sample before the sample process complete,why do I get 0 samples?

Bulidng matrices structure in labview

$
0
0

Hello all

I am new with labview. Before that I have used Simulink and matlab. I am trying to build the next structure, where F.A, .F.B, F.C and F.D are matrices (attachemnet). Any idea?

 

 

Labview and FTP

$
0
0

Hello,

we have a project in which we are using LabVIEW Web service. This service exposes several web methods which works fine. However one method still returns some errors. This web method behaves like this:

  • it is call from the production plant station
  • web method process the parameters and at the end it opens the FTP channel and download an XML file from the station which called it
  • process (asynchronously) the XML file and close the FTP channel

And here starts the trouble.

 

FTP Close Session.vi returns this error:

 

Error 1 occurred at TCP Write in NI_FTP.lvlib:FTP Command.vi:5860003->NI_FTP.lvlib:FTP [QUIT].vi:60002->NI_FTP.lvlib:FTP Close Session.vi:830001->ProcessResultsFile.vi->ProcessResultsFile.vi.ACBRProxyCaller.F3C00010; ; Possible reason(s):; LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @. TCP Write in NI_FTP.lvlib:FTP Command.vi:5860003->NI_FTP.lvlib:FTP [QUIT].vi:60002->NI_FTP.lvlib:FTP Close Session.vi:830001->ProcessResultsFile.vi->ProcessResultsFile.vi.ACBRProxyCaller.F3C00010

 

Even more. After this error message we can see in out error log another (probably related) error message:

 

Error -67304 occurred at NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi; ; Possible reason(s):; LabVIEW:  (Hex 0xFFFEF918) LabVIEW Web Services: Function not available for service VIs configured for output terminal mode.; Complete call chain:;      NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi;      NI_WebServices.lvlib:Web Request.lvclass:Write Response.vi;      SendResponse.vi;      AgwTraceability.vi;      AgwTraceability.vi.ProxyCaller NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi<APPEND>

<b>Complete call chain:</b>
     NI_WebServices.lvlib:Error Converter (ErrCode or Status).vi
     NI_WebServices.lvlib:Web Request.lvclass:Write Response.vi
     SendResponse.vi
     AgwTraceability.vi
     AgwTraceability.vi.ProxyCaller

 

If anybody could advise, would be realy appreciated!

 

Thanks,

Lukas

VISA Writes to Arduino is too fast for arduino

$
0
0

I want to send a serial write message to an arduino board, for it to do something on command. Is there a way I can get it to send the message multiple times for a specific length of time to ensure arduino receives the message?

 

Many thanks


Display Message To User subVI

$
0
0

Hi All,

I am using the Display Message to User sub VI in my application to show some messages according tot he state of my hardware. I am communicating successfully with the hardware, however whenever I close the application and Lab View and reopen it later, the Display Message to User sub VI disappears and Lab View shows it as a missing item. I am not doing anything to that VI yet I always need to re-insert it manually. Do you guys happen to come across something similar and have any suggestions? 

Thank you for your help and time in advance!

Attila

Mouse wheel scroll problem with indicators

$
0
0

Hello,

 

I have a problem, when the VI is running I can scroll an array of controls but when I switch to scrolling an array of indicators the Mouse wheel scroll is not working anymore on this array. The built in mouse support in enabled on these two arrays.

 

has anyone seen this problem before?

 

Thank you

OPC UA connection to Festo CoDeSys PLC does not work

$
0
0

Hello Community,

 

Following problem:

 

I try to establish a connection via LabView (client side) to a Festo CoDeSys PLC (3.5 SP10).

When I try to connect there's always error code: "-356619" - 

errorcode.PNG

 

It is possible to access the server via UA Expert:

UAExpert.PNG

 

The .vi:

VI.PNG

 

Has anyone similar issues with CoDeSys PLC's or a solution for this problem?

 

Regards,

Christian Hartung

Error: Exception has been thrown by the target of an invocation

$
0
0

Hi All,

 

While i am facing following issue :

32 bit vision dll in labview (2015) 32bit in Window7 64 bit (OS Laptop) - No Error

 

32 bit vision dll in labview (2015) 32bit in Window7 64 bit (OS PC) - Exception has been thrown by the target of an invocation

 

Regards,

Saran

Element-wise Multiplication funciton in LabView

$
0
0

Hello,

Is there any function in Labview which represents the Element-wise multiplication[.*].

 

 

 

 

Thanks in Advance,

Akash.

Clarification of 'Icon' of Boolean Constant in LabVIEW

$
0
0

Hello everyone.

 

I'm learning the basics of LabVIEW and came across a question that consisted of a while loop. The conditional terminal was set to 'Continue if true' and it is wired to a  Boolean Constant as shown in the above pic (refer to the attachment). Below is the another image of while loop with same condition but the Conditional terminal is wired to a 'usual' Boolean Constant. I just want to know the difference between both Boolean constants.

 

 

Thanks.  

Different behavior for a VI from lvlibp.

$
0
0

I have an VI that displays data on a string indicator. That vi run with a low priority. 

 

1. I use that VI as a SubVI parallel to 32 while loops without wait. The string indicator will display new values.

 

2. When I use the lvlibp version of the vi. The string indicator will not be updated. Until I stop one while loop.

Tested on LabVIEW Professional 15.0.1f7, W7 Professional, 2x Intel Xeon E5-2640. (32 logic processors)

 

3. On a PC with Xeon E3-1245 ( 8 logic cores) I have to stop at least 8 loops until the Indicator starts to display actual values.

 

4. lvlibp version with normal priority has the same behaviour like the subvi. ( Or I need more loops to see the difference).

 

Can somebody tell me why i see a different behaviour between 1 and 2?


Convert 3 Bytes to 16 Bit Decimal Number

$
0
0

Hello, I have the following problem:
From a RS-232 I recieve three Bytes (each consists of 8 bits and the first one is a Start Byte, it will be repeated) per second:
1. Byte (Start Byte):  01000000
2. Byte (Random): B8 B9 B10 B11 B12 B13 B14 B15
3. Byte: (Random): B0 B1 B2 B3 B4 B5 B6 B7

I want these two Bytes (2. and 3.) to be converted to 16 bit decimal number. Can you please help me?
I know that I need to use Visa Read and so on, but I don't know how to extract these 3 Bytes and combine two of them.
(Iam really new to Labview)
Thank you, Regards mattes

Make BD space for indicators trick (FOR loop + Case structure combo)

$
0
0

Hello,

 

I am interested in your opinions and suggestions for better handling of larger number of indicators. Let me explain the situation, then I will show some relevant code to explain better what I do.

So, I have developed an application where I interface several cDAQ modules, 4 RS232 units, etc. The GUI represents the "pipe and instrumentation diagram (P&ID)", which our users and engineers are familiar with. In my application I use 3 TAB pages, the first page shows the whole P&ID, the two others give other info to the users via other VIs which  are dynamically called and inserted into subPanels. The monitor size is 24 inches widescreen (1920 x 1200 pixel).

The main page where I have the P&ID, and managed to create a logical and easy to "look through" GUI, hiding most of the settings input into pop-up windows via runtime shortcuts menus. All main menu buttons are auto hidden, and they slide in when the mouse cursor pulled to the side, a kind of auto-hiding sidebar (using some runtime moving SplitterBars tricks), for further decreasing the GUI elements not always needed to be visible...

 

But still, this main page is required to show to the user about 40 (mostly numeric) indicators (system style). Due to the fact that LabVIEW (and I think also NXG Smiley Sad ) lacks the feature to use clusters which can have independent elements on the Front Panel, I cannot group (most of) these 40 indicators into clusters (they are at very different places scattered around on the FP).

I know, I know, we can use a classic cluster and make the border/bg invisible, but still this approach would create an "overlapping elements, GUI nightmare" on my FP.

 

So my basic problem was that, I wanted to keep my main VI BD neat and small enough (now it is like 1.5 monitor in vertical, and 1.1 monitor in horizontal), and these 40 individual numeric indicators on my BD would waste away lots of space...

 

My final idea was that, ok, not the nicest solution, but I can just use an outer fixed iteration FOR loop, and inside a CASE structure. Plus, the iteration terminal connected to the Case selector (cases named as 0 to N-1), see the example snippet below. I just bundle out by names the different data lines in this "Display" loop in my main VI BD, and connect the data by wire to the ~40 different indicators. Also, I can do some final scaling here too before presenting data. In this way I can easily see through the different (commented) cases, where the indicators are grouped logical way. So easy to debug, etc.

All this works fine, no problem. I just wonder, is this an "OK" trick to do (if we cannot use the cluster approach), or can cause problems (performance wise, etc)? Of course, I would never design a GUI where much more than 40 values are present at the same time, I was at "the edge". I guess I could have used some SubPanel or the above mentioned invisible cluster tricks, but I decided to go in this KISS way Smiley Happy

What is your opinion? I hope I did not explain it too much? Sorry for the long description! Smiley Very Happy

Thanks!

 

for_case1.png

Converting a Boolean control into a 1D array of digital waveform for NI DAQ

$
0
0

I have been trying to make a simulated DAQ, which will read a Boolean to control a relay.

 

However, when trying to send the array into the daq alone, i get an error that my digital waveform is 2 dimensional, but i require a 1 dimensional array.

 

Im sure its something tiny i just dont know, since i am basically a labview noob, but i would appreciate if anyone knows how to fix the problem

Modbus

$
0
0

Disclaimer: I am very inexperienced w/ labview and only a beginner so please be patient with me. 

 

I am trying to control a TEMPCO TEC-9100 Temperature Controller using labview. The controller uses MODBUS to communicate. I currently have it connected through a serial connection to my computer (through a serial to USB adapter). I have confirmed that there is connection between the controller and my computer. Now I would like to create a labview program that will allow me to control the controller from my computer.

 

Please let me know if you can help and please share all helpful resources!! 

Increase/decrease count to reach a certain value and then stop

$
0
0

Hello, I am working on a program to control an actuator attached to a load cell and need the user to be able to position the actuator such that the load cell is just touching a sample prior to a bending test. To do this, I want to have it so the user enters a voltage value and the actuator extends/retracts by increasing/decreasing the initial value by an increment (in order to control the speed) until it reaches the entered value then stops. 

 

I've had a couple of problems:

 

1) Getting it to stop. Whenever I set the loop to end when the count is equal to the input it never does. I have used a probe when running and the value will reach the input but will then pass it without terminating the loop.

Ex. Input = 3 the count will count up to 3 and then continue to 3.01 without stopping.

I can get around this by using a ≥/≤ but then the final value jumps between the desired value and +/- 0.01

 

2) Finding a way to set up the case structures so they can trigger different cases depending on which Boolean is true.

Ex. If Input > Count Value = TRUE execute case that increases the count, and if Input < Count Value = TRUE execute case that decreases count

 

The pictures attached show my most recent attempt to solve the problem and it works except that it doesn't stop. Upon reaching the desired value the count continuously fluctuates between the desired value and values +/- 0.01 causing the actuator to move in and out by a very small amount.

 

I'd very much appreciate any tips to solve my problem or make my code more efficient.

 (All done on LabVIEW 2014)

Viewing all 66852 articles
Browse latest View live


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