Variable in python enviornment to Channel value


adamLL

Recommended Posts

Is there any good way to get a value from a variable from a python environment into a channel/variable value in DAQFactory?

I am currently using an instrument that will only let me easily read its outputs with python.

My current idea is to have a python script that reads the output from the instrument, and then writes it to a file. Then I would use DAQFactory to read the file in as the channel value.

Link to comment
Share on other sites

V channels are largely deprecated, so I wouldn't recommend them.  They are left over from when we didn't have variables (like 18 years ago!), but so many people seem to use them that we can't really get rid of them.  I think people like it because you can see the contents in a table?  Other than this, and the fact that assignment to a V channel does the equivalent of AddValue() on a variable, a V channel is basically the same as a global variable.  A channel, however, has added features such as persist, conversions, and other things.  If you are getting an input value from the python script that is basically an I/O point, I would use a Channel.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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