Jump to content

what does this do?


Recommended Posts

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

Link to comment

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.

Link to comment

QUOTE (JiMM @ Aug 20 2008, 06:51 PM)

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..

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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