-
Posts
1,179 -
Joined
-
Last visited
-
Days Won
109
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Neil Pate
-
Out of memory error when using Picture Control
Neil Pate replied to Neil Pate's topic in User Interface
Tim, I am updating the picture control once per second with (potentially) an entirely new picture of 540x960 pixels, although I could easily cause the condition using the same image that has already been successfully displayed. -
Hi gang, I have just gotten to the bottom of a rather nasty bug that can cause an out of memory error in LabVIEW. It seems that under certain conditions that I cannot easily recreate in simple code the Picture To Pixmap primitive will attempt to allocate infinite memory. This manifests as a virtually instantaneous increase in the LabVIEW (or built exe) process up to the 2 GB limit and then the "out of memory" dialogue. The only input to this function I am using is the picture which I have formed using the standard primitives (so no trickery going on with me attempting to create the picture using string manipulation that I know is possible but have not attempted). Anybody else seen this?
-
Thanks Thoric, I did quite a bit of googling but that forum link did not come up. Guess I will have to live with a non-LabVIEW solution (for now).
-
Actually this WinExplorer application is not part of the SysInternals Suite (which yes does rock without doubt). I was just poking around now in the SysInternals Suite to see if they have something similar but cannot find one.
-
Strangely it seems there are two "somethings" for my LabVIEW executable (a LVDChild and a LVFrame class). Unfortunately this WinExplorer software does not seem to have support for the WS_EX_NOACTIVATE style. I suspect LabVIEW is doing a lot of its own window management behind the scenes. Bah humbug.
-
Yeah, I suspected the same thing so I tried building an exe. It behaved the same as in the IDE. I am going to try this.
-
Hi All, I am trying to make an on-screen keyboard (OSK). I have previously created a nice one that works perfectly if you can feed in the reference of the control that has focus. However I cannot seem to reliably get a unique control reference for several circumstances (e.g. an element of cluster that is inside an array). So I decided to try and make my own, in the spirit of the code of this open source project: https://sourceforge.net/projects/numpad-emulator/files/latest/download?source=typ_redirect The crux of my current problem is that whenever I click on one of my buttons of the OSK the focus is brought to the new window, and therefore I cannot direct the text into the control that previously had focus. I believe the way to solve this is to use the WinAPI to set the Extended Window Style of my OSK to be WS_EX_NOACTIVATE. According to MSDN "this style allows a top-level window created with this style to not become the foreground window when the user clicks it. The system does not bring this window to the foreground when the user minimizes or closes the foreground window". This is the technique used by the Numpad application I have linked to earlier and works perfectly. Attached is my attempt. The hex style 0x8000108 is what Numpad uses for the window style. I can successfully control this application from my LabVIEW test to turn on or off the NOACTIVATE by setting or resetting the greater "8" bit in the config. This just does not work for my LabVIEW window though. Any ideas? Num Keypad.vi
-
Horrible Event Structure Bug!
Neil Pate replied to Neil Pate's topic in Development Environment (IDE)
Hmmm, I cannot seem to recreate that behaviour either, but am pretty sure I have seen something similar. -
Horrible Event Structure Bug!
Neil Pate replied to Neil Pate's topic in Development Environment (IDE)
I have always actually disliked the fact that if you duplicate an event the IDE resets the Event Data Node to the full set. I have probably had this bug in the past but never actually noticed it. -
Horrible Event Structure Bug!
Neil Pate replied to Neil Pate's topic in Development Environment (IDE)
Thanks for confirming Antoine. I have filed a bug report (for LV2017). -
Horrible Event Structure Bug!
Neil Pate replied to Neil Pate's topic in Development Environment (IDE)
The first rule of the beta is... ;-) -
Hi All, I have recently discovered a subtle, but potentially disastrous, bug that can cause the Event Data Node to get confused as to the order of items which appear. I noticed this bug in LV2013 SP1 and have verified it still exists in LV2015 SP1. Please can somebody try recreate this on their system. I have not bothered installing 2016 and 2017 yet so cannot verify if the bug still exists. To recreate the bug: Open the attached VI. Notice the NewVal output is used. Also notice the Source element has been hidden. Add a new event, the Slide Value Change event to the existing Numeric value Change event. Notice the Source element is now present again and now OldVal is used ES Test.vi
-
Custom control request: flat style imaq image display
Neil Pate replied to infinitenothing's topic in User Interface
Why don't you just use a classic display and colour the background transparent? -
[CR] LabVIEW Task Manager (LVTM)
Neil Pate replied to TimVargo's topic in Code Repository (Certified)
-
Just so I am clear here you are making the distinction between OPC-UA and plain-old OPC? As long as I can connect to OPC-UA server from an OPC-UA client this is good enough for me.
-
Don't forget .NET calls in LabVIEW are extremely slow compared to DLL calls, something to do with the managed memory aspect. I seem to remember even simple calls taking several ms to return.
-
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Got this solved "hopefully". I gave up on trying to mimic this in MySQL as my actual system will use MS-SQL anyway. I rolled out a MS SQL instance in AWS and everything pretty much just worked. Specifying the datatype for a column as datetime2 allows me to insert and query with precision of 7 decimal places :-) -
Cannot pass argument to dynamic re-entrant VI
Neil Pate replied to RayR's topic in Application Design & Architecture
Thanks James, I have probably just labelled my code poorly, when I set the "Re-entrant" flag to true it is because I want multiple clones. -
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Just stumbled on the toolkit from SAPHIR (thanks smithd for the heads-up in the other forum post). Pure TCP/IP implementation. http://forums.ni.com/t5/Example-Program-Drafts/Native-LabVIEW-TCP-IP-Connector-for-mySQL-Database/ta-p/3496603 http://www.saphir.fr/en/produits/gdatabase-for-mysql-7.html Worked first time Now I just need to figure out if it is worth $700 , and I have just realised that this is MySQL specific and I need to actually interface with MS-SQL for my real system. As an aside I am pretty shocked at how simple a basic TCP/IP connector is. -
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Hmm still not really making any progress with this. My DB definitely has millisecond data in it. I have a table t1 with a single column of type DATETIME and have two records in this table, both with millisecond precision. If I execute the query from the server I get back the milliseconds, but the same query from within LabVIEW drops the milliseconds. It seems this is an issue with the OBDC driver, but I am not sure how to solve this. It has been suggested to perform an on-the-fly conversion to text as per my previously linked thread, but I cannot get this query to work properly. Any ideas? -
Cannot pass argument to dynamic re-entrant VI
Neil Pate replied to RayR's topic in Application Design & Architecture
This is exactly the same method I use. I use it to dynamically launch single instance of VIs that are never expected to be re-entrant, and also re-entrant clones. The only difference for the re-entrant clones is the flags used to open and the VI itself needs to be set to re-entrant. The two flags in the VI below are just the 0x80 and 0x40 flags. -
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Using the standard DB toolkit I cannot yet retrieve the fractional part using, but this could just be me doing something wrong as I have seen threads (like this) which states it should be possible. I have now confirmed using the mysql tools on the server that I can insert and retrieve fractional seconds using the DATETIME(n) type where n is the number of decimal places. Will do some more digging tomorrow. -
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Finally upgraded and of course the command to create the table did not work... because I had a mistake in. CREATE TABLE t1 (t dt DATETIME(6)); The "t" above was the remname of another column I had deleted from my query to simplify it, but obvsiously did not delete enough of it. Should be: CREATE TABLE t1 (dt DATETIME(6)); Still don't know if this has worked but getting somewhere slowly. -
SQL Timestamp will millisecond precision
Neil Pate replied to Neil Pate's topic in Database and File IO
Update: looks like my LAMP VM appliance is actually shipping with MySQL 5.5 which does not supprt fractional timestamps.. Updating at the moment... -
Hi guys, I need to be able to insert and retrieve a timestamp into an SQL database with miliisecond precision (ideally three digits of precision). Complicating the issue is that my final system is going to be hosted in a MS-SQL (so T-SQL) DB, but I am testing locally using a LAMP stack. I have done quite a bit of digging, it seems T-SQL would like me to use datetime2 type, but this is not available in MySQL. Apparently I can should use DATETIME(3) as the type. I am struggling to create a table with this as a valid column. I am using a LAMP VM appliance which I believe is running the a version of MySQL that supports fractional timestamps, but the SQL statement to create the table is failing. CREATE TABLE t1 (t dt DATETIME(6)); Any ideas what I am doing wrong? Secondly, it looks like the NI DB Toolkit has very primitive support for timestamps, and people prefer to use strings? Can anybody share their current "best practice after having done it wrong a few times" with me? Beer on me for solutions Thanks