electrika Posted August 21, 2008 Report Share Posted August 21, 2008 1)In the code below, I do not understand what is the function of V subvi? 2)Also in the second image what is the function of my global.vi and motion status , active status. I am sorry if this sounds silly, but I am kinda new to labview. Thanks Quote Link to comment
JiMM Posted August 21, 2008 Report Share Posted August 21, 2008 Eleetrika, Please do not post .BMP files. Convert them to .PNG format (or jpg) and repost. Not many people are going to waste the time to download a 2.25MB file, much less two of them. Quote Link to comment
TobyD Posted August 21, 2008 Report Share Posted August 21, 2008 QUOTE (electrika @ Aug 20 2008, 10:33 AM) 1)In the code below, I do not understand what is the function of V subvi? 2)Also in the second image what is the function of my global.vi and motion status , active status. I am sorry if this sounds silly, but I am kinda new to labview. Thanks Do you know about the context help window? Press Ctrl-h to bring it up, then hover over the subvi you would like to know more about. If the original programmer documented anything, you'll see more information about it in the context help window. 1. Based on the extremely limited information available, I would guess that this subvi sets the velocity of a given axis in um/s 2. Your guess is better than mine because you can see all of the code, but they appear to be global variables that are storing status information Quote Link to comment
mross Posted August 21, 2008 Report Share Posted August 21, 2008 QUOTE (electrika @ Aug 20 2008, 01:33 PM) 1)In the code below, I do not understand what is the function of V subvi? 2)Also in the second image what is the function of my global.vi and motion status , active status. I am sorry if this sounds silly, but I am kinda new to labview. Thanks There is no way to tell what is inside a sub-VI by looking at its icon. You can find out for yourself by double clicking on the icon which will cause that sub-VI to open up for editing in LabVIEW, and any sub-VIs in there can also be opened up, and so on, until you have looked at all the under lying code. If the subVI has any output terminals you can add indicators to them to see what is produced by the subVI as it is run. The highlitghing button on the menu (a light bulb) of the Block diagram menu allows you to watch the progress of the program as it operates. These may help you understand what is happening. Quote Link to comment
electrika Posted August 21, 2008 Author Report Share Posted August 21, 2008 QUOTE (JiMM @ Aug 20 2008, 06:51 PM) Eleetrika,Please do not post .BMP files. Convert them to .PNG format (or jpg) and repost. Not many people are going to waste the time to download a 2.25MB file, much less two of them. OK jimm i'll remember that..thanks.... "Do you know about the context help window? Press Ctrl-h to bring it up, then hover over the subvi you would like to know more about. If the original programmer documented anything, you'll see more information about it in the context help window. 1. Based on the extremely limited information available, I would guess that this subvi sets the velocity of a given axis in um/s 2. Your guess is better than mine because you can see all of the code, but they appear to be global variables that are storing status information" Thanks tobyD ...I know about ctrl-h but the original programmer has not documented anything for this subvi . But there are no connections coming out of the subvi. so where is the value set by the subvi being used? QUOTE (mross @ Aug 20 2008, 10:43 PM) There is no way to tell what is inside a sub-VI by looking at its icon. You can find out for yourself by double clicking on the icon which will cause that sub-VI to open up for editing in LabVIEW, and any sub-VIs in there can also be opened up, and so on, until you have looked at all the under lying code. If the subVI has any output terminals you can add indicators to them to see what is produced by the subVI as it is run. The highlitghing button on the menu (a light bulb) of the Block diagram menu allows you to watch the progress of the program as it operates. These may help you understand what is happening. Thanks for your suggestions mross,...I have uploaded all the codes within this code...thanks again.. Quote Link to comment
mross Posted August 21, 2008 Report Share Posted August 21, 2008 Now you see that there is depth to the "G" (Graphic) code in a LabVIEW VI. When you develop your own code you will regularly create subVIs that are functional blocks that can be run and tested on their own. In this case there is the function, Pm500 Send.vi, which sends a command string with a carriage return on the end of it to a port. I can't begin to guess what a PM 500 will do with the command. But you could test this yourself: If everything is wired properly to the PM 500 and powered up, when you activate this VI it should send the command string and cause something to occur. Then the Status and Byte Count are passed to the PM 500 Send VI (from whatever instrument the PM 500 addresses) and should appear in those indicators when the VI finishes its work. If you get no action or no returned data then you know something is not working correctly. You can see this makes debugging the Send PM 500 operation very straight forward. This is how you want to approach your own creation of LabVIEW code. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.