-
Posts
429 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Gallery
Everything posted by Mark Yedinak
-
My first suggestion would be to split your processing into two parallel loops. Place all of the motion control in one loop and place the camera control in the other. If you do require some form of synchronization use a queue. Alternatively you could place one of the processes into an event structure (within a while loop) and use user generated events.
-
A chance to give back to AQ
Mark Yedinak replied to Mark Balla's topic in Object-Oriented Programming
The X-Control could be listed as a friend of the class and therefore have visibility to the private data. Actually NI did a nice thing by creating a community declaration for class methods. In traditional OO a friend of the class would have access to all private methods. NI created the concept of a community method. Private methods remain private to the class. Community methods are visible by friends of the class as well as class members. And of course public methods are visible to all. This is a good question and if nothing else the user of the class should have the ability to override the X-Control with their own version. Based on the presentation at NI Week when this topic came up I believe that the push is to make the X-Control the default. However you would still have teh option of using the cube. -
Congrats!
-
In addition to using the VI description you could also use the Help Tag using an external help file. There are various tools available for creating, editing and compiling help files. Again, this puts your documentation for all of your VIs into a common place and takes advantage of the context help as well as the help file support.
-
Since you are already putting the code into subVIs then take advantage of the documentation property and tip strips for VIs. By doing this you simply need to select the particular subVI and show its help. You save yourself from having to open the VI and you also get some consistency in your documentation by forcing the document property to be filled in for all of your VIs. As far as which to believe, the code or the comment, you are right that the code is what is actually being done but you can't say with any certainty that it is what is right. The comment could be correct and it was simply coded wrong. That is one of teh main reasons I don't like using embedded comments in code.
-
You can also use the "Scan String for Tokens" or the "Search/Split String" VIs under the Additional String functions palette. I would suggest that you look through the examples for working with strings.
-
Um, I'm pretty sure that I was sitting next to you at Iron Works. I didn't think you had that much to drink already. The one issue that I see with your proposal for the overt conversion is that it will still require lots of rework for old code. At a minimum all of the old code will need to be wrapped to do the conversion. Truthfully I am not sure what the best answer is with respect to backward compatibility but it will certainly be an issue to contend with.
-
Just to throw my two cents in I generally don't believe in lots of documentation in the code itself. The main reason is that it is generally not maintained and therefore is rather useless. If you are in the code and you see that the code is different from the in source documentation which do you believe? A solid architecture, good use of modularization (and yes, all subVI's should have accurate documentation for the VI itself), meaningful data and subVI names as well as good style along with system level documentation tends to work best. I am not saying that you shouldn't use any documentation in the source code but it should be minimal. In the case of a state machine I do label all wires in and out of the state machine but they are labeled outside of the individual cases. As others have stated I try to minimize the number of wires flowing through a state machine and when appropriate I bundle the data into clusters. The unbundle and bundle by name inside the individual states will help to "document" what data is being used in the individual state (provided you use meaningful names on you cluster elements). Lots of comments embedded inside the source code are just one more thing that need to be maintained.
-
Strictly speaking you can't do what you are asking. A pure hexadecimal number is an integral value and cannot represent a fractional value. You can get the hex representation for the binary value of the double value but without knowing the internal representation of the value in terms of the mantissa and the exponent the hex value is rather meaningless.
-
Having attended the presentation I can certainly say that it was an excellent discussion and a very interesting topic. Several of us continued the conversation at dinner Thursday evening. The one aspect I wanted to say though is that whatever architecture gets chosen it should provide support for multiple errors. A good general purpose error handler should be able to see multiple error events and take the appropriate action. A prime example for this would be some system failure that is of a high priority and then a secondary error when trying to log the event. Both are certainly problems but how they are handled is completely different. With a single error the application would have to decide whether to ignore the error when logging the data or worse, override the more critical system error with the log error. Anyway, for those who were unable to attend I highly recommend reviewing the presentation.
-
You can look through the examples that NI provide. This gives you a pretty good handle on what can be done in LabVIEW. As for books you might want to pick up LabVIEW For Everyone. This is a good book for learning LabVIEW. The other thing you can do is hang out here. This place is a wealth of information.
-
Communication between projects
Mark Yedinak replied to EOF's topic in Application Design & Architecture
You can also use network queues. Network queue have a TCP/IP wrapper around native LabVIEW queues which allow you to pass data between two applications. You can even pass data between two machines. -
You can also encrypt the file using the Blowfish algorithm. You can find the code here.
-
I would look at two things that will help with your multiversion environments. First, if you are not using LabVIEW projects already then I would start using them. They help significantly to reduce cross linking issues and generally keep things more organized. Along the same lines I would look into using some sort of source code control. This way you can save code their and branch you applications and keeping working version for each of the different versions you are using. Now, do you need to distribute source or can you simply distribute stand-alone applications. If the latter then you don't need to be so concerned about the different versions of LabVIEW. However if you do need to distribute different versions you will need to use the approaches I suggested above. In addition, you will need to have each version installed on your development machine. You can save code to an earlier version but that is only supported for two revisions back. So, over time this does not become a workable solution. The only true way to support multiple versions is to have each version installed. If you need to do this I suggest that you look into the SSP program.
-
QUOTE (labviewnoob @ May 14 2009, 08:12 PM) Sure, just add a new line constant to your string concatenate.
-
Next Newbie Q: Local variable for an array?
Mark Yedinak replied to Michael Malak's topic in LabVIEW General
If you want help you will need to post either a more complete snapshot of your VI or the code itself. From the tiny snippet you posted it is hard to see what you are doing. Not to sound nasty of anything but I would suggest that you take the LabVIEW Basics I and II courses or at a minimum pick up the book "LabVIEW for Everyone". You would benefit greatly from some training to help get you started. While LAVA is a great source of information it is not the best place to try and learn LabVIEW from the ground up. There are better resources for that. -
How to save picture to file with index number?
Mark Yedinak replied to lovemachinez's topic in LabVIEW General
QUOTE (lovemachinez @ May 14 2009, 09:48 AM) No, LabVIEW does not "declare" variables in the way that you are thinking. The data is on the wire. Internally LabVIEW handles the allocation of the storage required and the wire carries the data through your application. As for your original questions here is a very basic (an contrived) example of how you can create new file names. -
This is just a simple post to see who will be going this year. My reservations are already in and they only thing left for me to schedule is the shuttle to and from the airport. So, who else will be going?
-
Based on the screen shots you posted your will never process your queues faster than 100ms per item. You have waits in your processing loop which will gate your performance. Since you are using the networks queues there really isn't a need to have the additional waits. The queues themselves and the TCP functions they use all have there own timeouts. Simply use those and take the appropriate action when a timeout does occur. Thus can simply be ignoring the timeout and going back to check for more data in the queue or the extreme case which would be to abort your application. Another alternative is to not include a timeout value (essentially a wait forever) on your queue. If you do this though you will need some external piece of code which will destory the queue allowing the code waiting un it to exit with an error.
-
QUOTE (Sonny @ May 12 2009, 04:57 AM) Can you post a screen shot of your code? This sounds more like an issue with how you are reading or waiting on the queue rather than an issue with the queues themselves. We have been using them extensively and have not seen any of the issues you describe.
-
Instantiate WaveGraph with Open VI Reference (Newbie)
Mark Yedinak replied to Michael Malak's topic in User Interface
QUOTE (Michael Malak @ May 11 2009, 06:21 PM) Given that you are essentially rewriting this application you can use this as an opportunity to make improvements. Just because something has been done for 15 years doesn't mean that it can't be improved. I am not trying to be argumentative but simply suggesting that this is an opportunity to make improvements to your application. There is quite a bit to be gained from user interface improvements. Good design can help to clarify things, improve productivity, help eliminate errors and so forth. Whenever I have to go back and touch old code I look for ways it can be improved. That is all that I am saying. And for the record I also have several decades of software engineering experience. -
Instantiate WaveGraph with Open VI Reference (Newbie)
Mark Yedinak replied to Michael Malak's topic in User Interface
QUOTE (ShaunR @ May 11 2009, 04:53 PM) You could but I would agree with mross. You need to think of what the user truly wants and design a user interface that meets those needs. Your suggestion while functional is actually looks rather unprofessional. Depending on the target audience this solution simply wouldn't do. -
I would never have considered using the N parameter to give me the number of iterations executed. I would always use the I value. As for the break I am glad they have added it. It made searching arrays easier than using while loops. When using while loops you would have to check for both the stop condition and the size of the loop. With the break in the for loop I no longer have to worry about the array size. I do see how this feature could be abused though.
-
project of automatic monitoring for greenhouses
Mark Yedinak replied to angel_22's topic in LabVIEW General
As requested, you need to post a better description of the problem you are having. What things have you tried already and what is the exact nature of your project. In addition, if this is a homework assignment please state that. Folks here are more than willing to help but we won't do your homework for you.