Jump to content

ShaunR

Members
  • Posts

    4,855
  • Joined

  • Days Won

    293

Everything posted by ShaunR

  1. I'd say it's a bug. If you uncheck the "Lock FP" for the "Do" case it works as expected. Clearly the FP locking is being triggered when it shouldn't. Changing the compiler optimisation has no effect so maybe it's something else. Rather nasty IMO. Congrats for isolating it. Also does it in 2009 so I suspect it's been around for a while.
  2. I can't account for your experience but for this library it is fine.
  3. Windows handles are always 32 bit. It should be fine in 64 bit LabVIEW unless there are pointers in there - but didn't see any.
  4. A.K.A. Not gonna fix so will memory-hole them. Was just looking at the SFTP from the beta link you provided. VI's invoking Command Line? Really? I've had SFTP for ECL for a while now but never put it in because no-one asked for it. I've been procrastinating about putting in SFTP, SCP, Websockets and MQTT for some time but decided I wanted a better HTTP client first (more configurable than the NI one). I've so many new features I could implement and so little feedback about what people would like to see I've only been updating with things I would find useful which, at this point, is very little than it already supplies.
  5. They must be the newbies. Here are the apprentices.
  6. I'm an apprentice, apparently When I finish my apprenticeship, I might be able to write some useful software.
  7. We agree to disagree. Both VI's I supplied answer the question. The first VI you can apply to your existing calibration fiddling whilst the the second VI doesn't require any calibration fiddling. It's up to you.
  8. Are you sure they are redundant? Looks to me like you have two lines - high pressure and low pressure. It's highly unusual to have a cal cert with "redundant" information in it and it would explain why a polynomial fit would be used instead of a linear fit-which would also get rid of your "glitches". I would be contacting the manufacturer for clarification at this point. But you know your devices so maybe I'm wrong. You have two examples of a poly fit so I guess the first VI I posted is where you want to start and incorporate it into all your data fiddling.
  9. Looking more closely at your data snippet. Since the left column has 2 data points very close together (certainly within measurement noise) you could have 2 lines/curves which maybe max/min. You might get that sort of file, for example, if you want to test the linearity of analogue output device with a 110v supply and a 240v supply. You may set an output, measure at 110V then change the supply to 240v and take another measurement before moving on to the next analogue output level. Anyway. the analysis method is the same, you just need to de-interleave to get the two lines/curves and maybe subtract one from the other before doing the poly fit. Later.... Ah yes. Makes more sense now when you said "pairs of rows" and why you want a poly. Polyfit2.vi For some reason the decimate arrays crashes LV so I had to use a while loop.
  10. Here ya go. Polyfit.vi Not sure why you would want a polyfit on a straight line though.
  11. +1. You can also run a scripting VI on it that turns autorun off if you are concerned.
  12. You will have to figure out why you are getting 0's in the reading. One thing I will say though. Right click on the serial read and write and set them to "Synchronous". Asynchronous reading is a much more complicated use case and you will struggle with the consequences while learning.
  13. For integers you can just reconstitute as i64 regardless. That covers most of them. A note telling the dev that this is so, means they can do things after for the edge cases. Most of the time the native coercion will cover the edge cases when the dev wires them up. Same goes for Singles and Doubles as Extended by detecting the decimal point, lack of quotes and the E in the JSON string to differentiate them from integers. So you end up with only 2 numeric types. I64 Integer or extended depending on the JSON format of the number.
  14. If the samples array is empty then you are probably getting an error before or at the Scan from String -the error out of which you have wired to the case structure. You will need to debug and figure out why that error is occurring. I would suggest you make the decoding part of your VI a sub-vi. This will enable you to check the string decoding after the serial reads in isolation to receiving a response from the instrument. In doing this, you can paste in the strings you supplied earlier and check that the correct array is updated. I have done this for you below. It fixes a couple of issues with the Channels array not being passed through the false case and indexing the array from zero when channels begin from 1. Decode.vi
  15. Your expert is correct. You must seed the channel array with as many items as you expect to index with the index array otherwise there is nothing to index into. You can define the array constant with as many channels you are expecting or you can do the following which will enable you to arbitrarily create a number of channels of your choosing.. You seem to be struggling with basic LabVIEW structures and functions. I would suggest you read and watch some online learning materials - especially around arrays and clusters - or maybe consider a LabVIEW course.
  16. The link in the *.sh files for an explanation of the cmd options does not work so I've posted them here FYI.
  17. I wouldn't have passed your interview. I don't think he is saying that. He is saying that since the employees' training wasn't a cost borne by the company but by the customers, therefore they are fair game for poaching. I still disagree, of course. It's just a rationalisation of a despicable behaviour to alleviate guilt.
  18. We've had native UTF8 for years and lots of utils can handle UTF16/32. Just can't display it very easily and none of the file controls/functions support it. It's a UI problem that NI have avoided like the plague.
  19. Not sure where you are getting the format "Channel" and "=" from but if you are using the above command to get all readings then it clearly states the format is "CH#EZOvvvv". To save line-by-line then, once decoded, just pass a 1D array of values to the 1D array terminal of "Write to Delimited Spreadsheet" with the "Append?" set to true.
  20. Pass a U8 array of length EFIUDS_MSG_MAX_DATA_SIZE Unions are syntactic sugar for a single piece of contiguous memory. You'll just have to figure out how to interpret the data.
  21. SFTP is a big one. It means I don't have to implement it
  22. I also have not really had to implement undo for a sophisticated application. I have implemented "Restore Ro Default" and limited undo for settings, configurations and such but have not been called upon for the kinds of undo required for things like drawing. I would imagine the same method could be used though. I used the SQlite Savepoints for configurations and a default table which could be copied to the main table for "Restore to Default". The latter is an example library in the SQLite Toolkit for LabVIEW. Other similar operations can also be realised like restoring the state of the UI after exiting (form position, controls etc) but that's not really what you are asking here; just an indication of the usefulness of these approaches. Addendum: There is a description of a method for Undo/Redo using SQLite triggers. Automatic Undo/Redo Using SQLite They over complicated it by doing it in an "Object Oriented" fashion but I might use something similar for the redo while keeping the savepoint method for undo.
×
×
  • Create New...

Important Information

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