Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/13/2012 in all areas

  1. If you want to see a Certified LabVIEW Developer sample exam written using LabVIEW classes, I am uploading one here. I built this over the last four hours in response to comments in another LAVA thread which correctly pointed out that a sample CLD written with classes was not available for review. If you wish to comment on improving this class-based sample exam or ask questions about how it works, please post them here. If you wish to debate whether LabVIEW classes are worth using or whether they are overkill for real apps (including for the CLD exam itself), or any other philosophy, please post in the original thread that spawned this. The sample exam that I did was ATM version 2 (I am attaching the PDF to this post for ease of reference). After 4 hours, I have the solution posted below. It is not a fully fleshed out app -- it is exactly what I have finished after 4 hours and would have turned in on the exam. It is very similar to what I turned in for my actual exam, although I will note that for my actual CLD, I specifically brushed up on file handling and had that working. Tonight, I was unable to recall my cramming, so that just got dropped (but documented as a TODO!). Top level VI is ATM UI.lvclass:Main.vi. This VI takes an ATM UI object as input in case configuration options are added to this application in the future -- those options are already part of the UI loop. Issues that I know of: File I/O is not done, as I mentioned above. The display strings are placeholders ... I didn't type out all the proper strings. There's no way for the user's name to be displayed when they put in their card. Although I documented the VIs, I did not fill in documentation into the classes themselves and probably should have. Other than that, I think it all works given the limited testing I was able to do within the 4 hours. I have no idea why I felt the need to make setting the display message go through an event instead of just setting the local variable every time. I think i had it in my head to bottleneck the localization, but that doesn't work, of course, because you have to be able to format information into the strings. That should probably be removed entirely. I did build a message abstraction from ATM UI to ATM, but I didn't build a messaging abstraction from ATM to ATM UI. Why? Because I thought the data needed to respond was always the same. It wasn't until later that I decided that was a mistake, but I figured I should finish out this way. Building a true abstraction layer for completely isolating the ATM from the ATM UI is probably more than can be done in the 4 hour block unless you've got some scripting tools to back you up -- we'll have to see if it's reasonable in LV 2012 (without going into detail, assuming the beta testing goes well, there will be tools to help this exact problem in 2012). 100928-01.pdf AQ_ATM2.zip
    2 points
  2. The resemblence is uncanny. I'd go so far to say that an automated image search alorithm thought you were the same person.
    1 point
  3. It definitely works. I played around with the different LW API functions. You can even use the system() function that is part of the ANSI C library. My example command was: char *cmd="cmd /k echo \"Hello world\""; Here are the options: // Does not wait for the executable to finish. LaunchExecutable(cmd); // Waits for the executable to finish. Even part of the ANSI C standard. system(cmd); // Runs the executable... int procHandle = 0; LaunchExecutableEx(cmd, LE_SHOWNORMAL, &procHandle); // .. and enters a loop (timing 0.1s) that waits for the executable to finish. while(!ExecutableHasTerminated(procHandle)) { Delay(0.1); } There's really no problem here, perhaps there was one years ago in the stone age of programming, I have no clue :-) That may be an even better idea ;-)
    1 point
  4. This isn't so much of a trick as it is a manifestation of two cool features that aren't really advertised: If you copy FP / BD objects it puts a picture of them on the system clipboard and it places a copy of the objects themselves in LabVIEW's internal clipboard. You can paste from the system clipboard in the icon editor.
    1 point
  5. Maybe this second version of the CLD practice exam (sprinkler controller) will be more exciting for people to review. There are no subvis which are not part of a class. Sprinkler Controller LV 8.6.zip
    1 point
×
×
  • Create New...

Important Information

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