Jump to content

CraigC

Members
  • Content Count

    54
  • Joined

  • Last visited

Community Reputation

8

About CraigC

  • Rank
    Very Active

Profile Information

  • Gender
    Male
  • Location
    England
  • Interests
    Paragliding, Snooker, LabVIEW

LabVIEW Information

  • Version
    LabVIEW 2015
  • Since
    2000

Recent Profile Visitors

1,322 profile views
  1. Hi, couple of things. When building an executable the path of the executable is now inserted into the path so C:\MyProject\MyFile.txt becomes C:\Myproject\MyExecutable.exe\MyFile.txt If this is already accounted for then the easiest way to find out what is happening is to create a debuggable executable which enables you to debug as you would normal do in LabVIEW environment. See here https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAiTSAW Craig
  2. Hi Bira, Your data is being accumalated by the use of the Feedback and Concatonate string nodes. You are essentially appending each "packet" with all the previously received packets which is why your REsponse indicator is growing every time round the outer loop. You also need to think about how your "packet" is defined. As you mentioned in your first post the "packet" is terminated by a Carriage return, hence you should terminate your read with a Carriage Return. See attached VI EDIT as you have stated "The first data packet ends with a <CR> and my boards repeats that every 3 seconds. " Then you will need to increase the timeout value in my VI to something greater than 3000ms, say 5000ms or so. Craig String.vi
  3. Lots of ways.. You can play around with the type and representation from the scan from string function. String.vi
  4. This boils down to Nyquist, which essentially says you can resolve an original signal at twice the sampling rate (According to the mathematics at least). However it is recommended best practice to use a sample rate at least 8 times that of the signal you are trying to measure. So for your 8KHz signal you will need to Sample at 24KHz at least. If you are trying to look for other features within the signal (Rise times, Overshoots, Ripple noise etc) then you will probably need an even larger sample rate. With the output signal the same thing applies but in reverse. If you want to produce a 8KHz Output signal you really need to clock the data out at 24KHz at least, I believe the output clock rate can be set on those cards (It has been so long since I used AO) In both cases though the more you over sample the smoother and more representative your aquired/generated signal Craig NI white papers are usually pretty solid at explaining these types of things. http://www.ni.com/white-paper/2709/en/ and Wiki https://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theorem
  5. Hi Rolf, Thats a handy way to think about it thanks for the tip.
  6. Hello, Time for a little update maybe. This little comment helped me realise the solution for what I was attempting to do. By using composition the problem with merging classes back into a hierarchy was absolved. I did end up using DVRs as again the need to merge was absolved. I could of just used clusters to split and merge from the onset but I have learned a little of OOP on the way so all is good. Also using DVRs made saving and restoring data into named attributes fairly simple (using the unique tree tag as a name). I still feel a little uncomfortable about putting things into a hierarchy and although smithd is technically correct... measurements can all have limits and each test all has execution behaviour. Having said this composition is fine and there is no real need for hierarchy here. Hi Stagg54, Yes we use TestStand on other projects. The main focus on this sequencer was to allow Hardware engineers who are not familiar with TestStand or LabVIEW the ability to make sequences quickly and easily from within the same application. I am not trying to build the monolithic one size fits all application. This sequencer does not cover a lot of features available within test stand and is much more limited in its capabilities. It is designed to run on specific hardware (at the moment), with the philosophy of being easily modified to target other pieces of test equipment as the need arises. Thanks for all the input, I have much more of an insight into OOPy stuff. I think my inital downfall was trying to be too strict on the design by using only by value and forcing the design into a hierarchy when the final solution didn't quite fit either of those methodologies. Craig Also of note, not being able to hide or set column width in tree controls to 0 is most frustrating!!
  7. If you use the type filter on the Get All Descendants method you can get files of a particular type. Library will find *.lvlib etc. This should help with speed as you should not have to loop through every item, just the ones you are interested in. As a side note i Remeber having to drop down to "My Computer" first although "Root" seems to be working for you also
  8. Hi smithd, Thanks for the advice. I have had a quick look at composition vs hierarchy and it does indeed look like this is more suited to my needs. My initial reasoning for inheritance was that during the execution of a test plugin it parent data should be readily available and bound as such to the test subject (to test limits etc). However it looks like the same objective is achievable if I use composition so will give it a go and see what works best. Better to try new things now at the early stage of learning! Thanks Craig
  9. Hi Smarlow, Thanks for the comments, I am also not a fan of the one Framework fits all and in my particular instance the trhee panels are pretty static and wont be loaded in different places all over my code etc. However using the techniques above I have ended up with quite a dynamic flexible configuration screen. I often take the approach that the most direct effort (while still using patterns) is often the best and avoid using bigger frameworks. I also have experience in automation machines which dont tend to like being shoe-horned into a large fits all framework. This is more of an exercise to learn some OOP and as it happens some DVR stuff also. I am actually using a "framework" that i have already written and used successfully but was a bit clunky storing configuration data so was looking to see if i could simplify this process both on the configuration screen and the "Run Sequence" screen. I think now I have these objects stored and their data readily at hand I will help in the creation and execution of new tests. I dont know, all this is subjective, and I am all ears Newer Version of the configuration screen using techniques as above. Old Version of configuration screen with data stored in the tree control.
  10. Hi All, The DVR Method seems to be working well, although it has raised a couple of questions on best practice. Currently I take a reference of the object in the parent class and cast this in the children as per this thread for guidance https://forums.ni.com/t5/LabVIEW/Combining-LVOOP-DVR-with-Asynchronous-Dynamic-Dispatch-and/td-p/2254600. I am thinking this is the correct way to go about this. Also I am using the preserve Runtime engine in the "Test plugin" class to retrieve my object and maintain runtime class on my DD wire, first time using this primitive and just wanted to double check I am not misusing it. The attached mockup works for demonstration but has an issue with the subpanels not loading, I am not concerned with this as my main application does this in a different manner anyway (It was just the quick and dirty to get this example running). Thanks for all the help Craig Lava Temp.zip
  11. Hi Shoneill, Thanks for the input. I was thinking about DVR but initially thought that I should be able to do this in a traditional "split wire and merge" approach. If you are saying that DVRs are the way forward then I am guessing I have hit an actual hurdle rather than me missing something easy which is what I was fearing. I have not played with DVR much which is another reason for my initial hesitation although this seems to be the perfect scenario to give them a go. I will refactor the mockup I have made and keep you both updated. Craig
  12. Hello, Try this link, http://forums.ni.com/t5/LabVIEW/Read-text-file-and-plot-XY-graph/td-p/1555884 Thanks Craig
  13. Hi Tim, Thanks for taking the time to have a quick look at this with me. It is essentially configuration of a plugin type structure of a class Hierarchy A->B->C. For each plugin say "classC:modifyUI.vi", is for modifying its own internal data. It also calls via call parent method "classB:ModifyUI.vi" which takes care of handling meta data, which then calls "classA:ModifyUI.vi" which takes care of globally configured data. I am able to load every class "modifyUI.vi" in the hierarchy in parrallel such that user essentially just sees a configuration page. All good so far. My initial reasoning for having this hierarchy in this manner is that the child object is held in a list of other child objects or "plugin Tests". The test is merely concerned with its data for running a test or taking a measurement etc. Its parent method deals with meta data associated with that test, "limits", "Requirements" and other references associated with that test instance. The top level in the hierarchy deals with other flags such as "on fail options", "abort", "repeat conditions", "test type" etc. Merging the Data when there was only two classes was fine as I only needed one VI in the child class which was static dispatch. However merging the data between N classes throughout the hierarchy requires dynamic dispatch and this is where this structure is currently falling over. If I were to set the hierarchy as you suggest would I not break the ability to run the "plugin Test" and be able to call upon its parent data for handling the test instance? Apologies, I should of explained this in my initial post as it is pretty much a big part of what I am trying to achieve. I am in this twilight zone of trying to keep my classes by value. I understand I could send the modified data via Queues to a collection VI like say with rendezvous. However I think I am missing something in OOP which is blindsiding me to the correct way of achieving what I am trying to implement. Craig
  14. Hello, Bit of an odd one and I am probably doing something fundamentally wrong however I am fairly new to OOP. Essentially I have a hierarchy of 3 items say A, B and C. I have a DD VI called "ModifyUI.vi" in each class and I am calling this VI and its parents in parrallel (Probably not a great idea but it is my end goal). After each "ModifyUI.vi" has completed doing what it needs to I would then like to collect each VI's data as they were all run in parrallel back into the initial class that called them all. I have attached an overview of what I am trying to achieve in a mockup of my problem. I am willing to change tack as long as the same goal is reached (Modify all class data in parrallel). Thanks in advance Craig Lava Temp.zip
  15. Well you dont need to load the whole table, just adopt a Query or whatever, but I was just using it as an analogy.
×
×
  • Create New...

Important Information

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