GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 GMC-320 Plus stops after 128 samples
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fmotl

2 Posts

Posted - 09/25/2014 :  13:54:38  Show Profile  Reply with Quote
Hi there,

Just got a GMC-320 plus. I'm using it with pyRadMon on a Linux PC. It works great however the sampling stops after 128 samples with the following error.

Problem in getData procedure (disconnected USB device?): (5, 'Input/output error').

See Python code below.

When I start the problem (without doing anything else such as unplugging/replugging the device), it works again for 128 samples, then stops again. As far as I can tell the device is operating normally - observing what I see on the display.

Any suggestions?

cheers,
Fred


try:
  # wait for data
  while (self.serialPort.inWaiting()==0 and self.stopwork==0):
    time.sleep(1)

  time.sleep(0.1) # just to ensure all CPM bytes are in serial port buffer
  # read all available data
  x=""
  while (self.serialPort.inWaiting()>0 and self.stopwork==0):
    x = x + self.serialPort.read()
    if len(x)>0:
      cpm=int(x)

    utcTime=datetime.datetime.utcnow()
    data=[cpm, utcTime]
    return data
except Exception as e:
  print "Problem in getData procedure (disconnected USB device?):", str(e)," exiting!!!"
  self.stop()
  sys.exit(1)

Reply #1

ZLM

1261 Posts

Posted - 09/26/2014 :  15:50:21  Show Profile  Reply with Quote
What are you sending to device?

You may need change the Exception location to narrow down to a particular code line. That is easier to find out the problem.
Go to Top of Page
Reply #2

fmotl

2 Posts

Posted - 09/30/2014 :  16:16:37  Show Profile  Reply with Quote
Hi all,

Turned out to be a problem with the USB HUB.
I guess it failing after 128 samples was an interesting coincidence!
All good.

thanks,
Fred

Edited by - fmotl on 09/30/2014 16:16:57
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.07 sec. Snitz's Forums 2000