Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8464797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:51:38+00:00 2026-06-10T14:51:38+00:00

I have a supplemental question to a question I asked earlier, which you can

  • 0

I have a supplemental question to a question I asked earlier, which you can refer to if necessary:

Long term instrument data acquisition with Python – Using "While" loops and threaded processes

I’ve gone through a bunch of SO questions and other reading, and came up with a block of code that works fine, though it is very rudimentary:

import ue9
import LJ_Util
import DAQ_Util
import threading
import Queue

queue = Queue.Queue()

def ljThread(ue9ipAddr):
    print '\nExecuting in ljThread...'
    a = ue9.UE9(ethernet=True, ipAddress=ue9ipAddr)
    reading = a.feedback()
    queue.put(reading)

print "Opening device...\n",
# Opens a UE9 at IP Address 192.168.1.127
ipAdd = '192.168.1.127'
feedbackThread = threading.Thread(target=ljThread, args=(ipAdd,))
feedbackThread.start()

outcome = queue.get()
print outcome
print "\nDone"

My question is, I want to use individual threads to access information from different instances of the object ue9.UE9, which is tied to a data acquisition unit. I anticpate each unit will return different data, but I need to associate the right data with the right unit. Can anyone point me to the right way to track back sources through the queue object being used to pass data back to the calling thread?

Thanks, folks, in advance, for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:51:39+00:00Added an answer on June 10, 2026 at 2:51 pm

    It should be pretty easy to modify your ljThread function to return identifying information (such as the IP address it was checking) along with the data it reads. Just replace the last line with:

    queue.put((ue9ipAddr, reading))
    

    Then when you grab the results from the queue, do:

    ip, outcome = queue.get()
    

    You can then use the IP to do whatever you need to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large table of supplemental data that is filled in from a
I have a main data store which has a big set of perfectly ordinary
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have deployed numerous report parts which reference the same view however one of them
Some background I have a set of data that represents the alchemy ingredients and
basically i have a side by side horizontal menu as you can see here:
I'm writing a simple eclipse plugin, which is a code generator. User can choose
Let's say you have a class library project that has any number of supplemental
I know that Windows has supported supplemental planes since Windows XP. I have fonts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.