Jump to content

Neil Pate

Members
  • Posts

    1,156
  • Joined

  • Last visited

  • Days Won

    102

Posts posted by Neil Pate

  1. 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 :beer_mug:

    Thanks 

     

     

     

     

    Capture.JPG

  2. Filipe, I do not see NI getting into the business of suing the end users of LV FPGA.

    Not that I disagree with your points, I just think it is unlikely NI would go after anybody other than the obvious primary culprit.

    Now, even having said that, I am still not going to expose my company (or my clients) to this risk and will choose NI officially sanctioned products over questionably legitimate offerings.

  3. 2 minutes ago, drjdpowell said:

    I always find images annoying because the are by-ref.  You send a copy of the reference to the image, not a copy of the image.  

    But they are kinda ByVal as you wire into an indicator to actually display the image. You cannot just make that association once and then assume it will automatically get updated.

  4. 2 minutes ago, drjdpowell said:

    Cast it to a U64 instead of an I32; then the numbers are different.

    Bingo! Thanks James.

    So Image refs are just plain old normal U64 size refs? I sometimes wish there was a way to see refs as native "pointers" in a probe rather than the special type (i.e. the image). I suppose I could create a custom probe and just display the U64...

  5. Hi gang,

    Simple question, can I treat a Vision Images ref just like any other U32 ref with all the rules applicable like forking wires etc? It seems to me that there is some kind of special stuff going on with Vision Image refs.

    Another related question, in my particular use case I have a piece of code generating a user event with an image as the data at some arbitrary fast rate. The act of Generating the user event creates the a copy, right? Some other code wants to process some of these frames (at a slower rate) and then I use IMAQ Copy to make a local copy, is this IMAQ Copy necessary or could I just hold onto the "Image" reference coming in from the user event? In the code below Images is just a local buffer I plan on using.

    Capture.JPG

     

    The reason I ask is I am getting some weird behaviour whereby destroying my Images refs as shown in Capture3.jpg kills my acquisition code as well. (I presume because I am forcing all images to be destroyed, but I am surprised this is happening)

    Capture2.JPG

    Capture3.JPG

  6. 1 hour ago, peter_flores said:

    @Neil Pate thanks! So, you are describing a one-time break and fix? When you say manually relink the ActiveX component, is that similar to my screenshots Version 1.3 and Version 1.9 above? Also, interested in your thoughts on the RGT as noted above... Thanks!

    I did not need to do as you documented, it was sufficient for me to just re-select the broken method call inside the offending RGT VI . If memory serves me correctly it was the "SaveAs" method of the _Workbook object. All I had to do was reselect the method and it then was no longer broken. I think I noticed that the new method had an additional input.

    But as I mentioned, although this worked fine on my PC it was broken on the target PC which had a much older version of Excel, so in a panic I uninstalled Office 365 and installed Office 2010 and everything then worked fine.

    Capture.JPG

  7. I do not have an answer to your problem but can only share something that happened recently which is probably not related to your issue but I will say anyway. I have an Office 365 subscription and one of the more recent updates broke the report generation toolkit as the ActiveX interface to Excel changed. I was able to manually relink the ActiveX component in the code and everything worked fine on my PC after that, but the executable would then not run on my target machine which had an older version of Excel on it.

  8. Ok so lets try and make this as simple as possible. Imagine all you have is a single constant value of your International thankyou enum on your block diagram. I get the feeling you would like to display this as a 2D string array with the first column listing all the possibilities of the enum and the second column has  "1" in the column of the row that matches the constant value otherwise it has a 0, is this correct?

    Can you describe in words how you would create this array?

  9. I have given you my advice. Try implementing it as a 2D string array first. Leave the tree out of it.. Once you have mastered that you can think about getting it working in the tree.

    As I said way earlier on in this thread I really think you are "mixing methaphors" here. The cluster viewer displays the "values" of items in the tree, not the set of all possible items. If you want that you are going to have to add it yourself and the tree API is not pleasant to work with.

    • Like 1
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.