Jump to content

Sam_Sharp

Members
  • Posts

    7
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Sam_Sharp

  1. Excuse the benchmarking spaghetti but it does seem to be slower:

    image.png.02306eb98c3ed291293456136dc12c85.png

     

    0.26s for 1000 updates using Get Text Rect. 0.53s using the caption method with a UTF-16 string. Using it without UTF-16 support (i.e. applying font & text to caption) it's still slower at 0.44s for 1000 updates.

    For UTF-16 strings we don't have a lot of choice though. A previous workaround was to convert the UTF-16 to ASCII and then replace the resulting ?'s with one or more sufficiently wide characters.

  2. I came across this topic whilst trying to figure out the text width for UTF-16 strings - the solution we used was to write the text/font to the caption of a string control with 'size to text' enabled and then read the Caption.Area Width property:

    image.png.6bb8c5c60af9f903e887bbb8346050cb.png

    image.png.607ce5509f1b61b9256b85fe53db5e82.png

    I think the only issue is that LabVIEW adds a few pixels of spacing around the caption - but I think this will be a constant that can be removed.

    • Like 2
  3. On 2/28/2019 at 6:30 PM, drjdpowell said:

    Pretty Print is designed to keep small objects compact.   Anything less than 40 characters.  I think it's more readable, especially for arrays of small clusters.

    Ah ok - that makes sense.

    On 2/28/2019 at 6:26 PM, drjdpowell said:

    Are you using 2018SP1f1?   This sounds like the horrible compile bug present in 2018 before SP1f1 that tended to hit VIMs heavily (CAR 715018).  The f1 patch fixed this.

    No - 2018 f2 but I'm updating now so I will see if that fixes it. I did already go through and replace all of the JSONtext VIMs but I'm using other VIMs anyway so will see if that helps.

    On 2/28/2019 at 7:25 PM, drjdpowell said:

    That's inherited from the NI JSON function, which I used for fast array parsing.   I may have to spend the effort to develop and alternate solution, or develope better guards for corner cases..  There are a lot of edge cases mapping LabVIEW's strict types to JSON.  

    Yeah, I definitely think that throwing an error for an empty 2D array is unexpected behaviour so it would be nice if I didn't have to work around it.

    Thanks for the responses! :)

  4. Hi,

    Is anyone aware of any LabVIEW 2018 stability issues when using this library? I am working with a couple of projects and am getting hard LabVIEW crashes when running my application in the development environment and also executables that hard-crash when launched. A mass compile seems to resolve the IDE crashes temporarily but it can sometimes take reboots/LV restarts/mass-compiles to get the executable to run when built. Issue is present in LV2018, f2 and 2018 SP1 with versions 1.2.11.78 and 1.2.13.82 of the library.

    I'm pretty sure it's this library since that's the common denominator between the projects (3 projects..one PC GUI, one RT and a project from a separate developer where the only common library is this and a DAQmx configuration library based on JSONtext) and I have a suspicion it's because of the Malleable VIs?

    Also, I have noticed a couple of bugs:

    1) Pretty print misses a line-feed (I think when merging objects but there is no pretty print input on the merge) and this isn't picked up/fixed with the 'reformat' VI:

    2019-02-28_11-26-25.png.6890e17c365b411ea9658e5ea8481885.png

    2) From JSON with a 2D array errors if the array is empty:

    2019-02-28_11-29-08.png.4afe802bf64332d3d567969caa5c0f57.png

     

    Overall, I think this is a really nice library with lots of flexibility for manipulating the JSON - I use to use the MGI/OpenG read/write anything for configuration but I'll be using this more in future for configuration. We're using it here for storing application and DAQmx configuration information and also as the framing for TCP/IP communications between the Target/Host.

  5. Just wanted to pop in and say thanks for the updated library with better (Linux) RT support. I've written my own GZip compression VI based on the DEFLATE and CRC32 VIs in the library and I was hoping to be able to use it on the RT / Linux RT sbRIOs. I'm using it for compressing JSON data to send over the network.

     

    I've posted the VI over on the NI Community (awaiting moderation) in case anyone else needs a GZip compression VI.

     

    Thanks! :)

  6. Hi all,

     

    I'm all signed up for the BBQ - I haven't been particularly active on here as my time only allows for so many forums and I tend to focus most of my efforts over at the NI forums when I do get a chance to browse.

     

    Looking forward to it - please come and say hi if you see me as I'm travelling to NI Week alone from the UK! Also look out on the exhibition hall floor for my 2nd Giant Tetris (providing it makes it there in time and in one piece!). I'd also be happy to talk to anyone about WebSockets and bringing some more web-love for LabVIEW!

    • Like 1
  7. The LavaG forums have been a resource for me for a long time (often helping to solve some pretty interesting/difficult challenges!) but as there is so much information here already I've never actually needed to post anything myself!

     

    I've been using LabVIEW since 2010 (bit of serial comms with a self-balancing robot), then did a sort-of graduate placement looking at modelling and control of a servo system with LabVIEW and now work full-time as a LabVIEW developer - I've had my CLD for just over a year and I'm hoping to do the CLA at some point in the first half of next year.

     

    I've worked with a lot of different technologies (cDAQ, cRIO, PXI, RT/FPGA, TCP/IP/Web, 3rd Party Instruments, VISA, Control Design & Simulation Toolkit, Databases, CAN) - but there is always more to learn! Of particular interest to me is interfacing LabVIEW with the web - I have experience of PHP/MySQL programming so finding ways to combine the two is pretty interesting (I've done a project at work installing LabVIEW as a Service on ~100 PCs to monitor the software/PC uptime to a central database for reporting/statistics). At home, I'm currently building a giant version of Tetris (

    ). 

     

    I've been to NI Days in the UK a few times (heading there on Wednesday!) and I also got to go to NI Week in 2012 and had a great time!

    • Like 1
×
×
  • Create New...

Important Information

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