acknowledgement byte after a call to syncAllParams.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
acknowledgement byte after a call to syncAllParams.
#1
Hi,

I'm using python to send some different parameters (Phase1Duration, InterPulseInterval and PulseTrainDuration) to the PulsePal - randomly, in a loop.
I give plenty of sleep time (~5s) after having run "myPulsePal.syncAllParams()" to "myPulsePal.triggerOutputChannels(1, 0, 0, 0)"

Just recently I got this error:


Code:
raise PulsePalError('Error: Pulse Pal did not return an acknowledgement byte after a call to syncAllParams.')
PulsePal.PulsePalError: Error: Pulse Pal did not return an acknowledgement byte after a call to syncAllParams.

From line 232, in syncAllParams - in PulsePal.py

It's not optimal that the loop / script will be broken / stopped - after having run for 2+ hours - to then redo it.

How do you cope with this error? Do you safeguard yourselves to avoid your scripts being stopped by an error raised?

Would it be something like putting a "try" before the myPulsePal.syncAllParams() - and asking to try again, if it fails?
Or what would you do?

Hope to hear from you!

Br,
Christian Skoven
Reply
#2
Hi Christian,

What OS and python version are you using?
What version of PySerial do you have installed?
Which (if any) other applications are you running simultaneously?
How frequently are you seeing the issue?

You shouldn't need to sleep at all - once Python returns from syncAllParams(), you can immediately use triggerOutputChannels(). If not adding a delay is causing the error you're seeing to occur more frequently, that's helpful information.

I don't think using 'try' would help - if Pulse Pal isn't acknowledging a transmission, it is probably stuck expecting data that will never come.

-Josh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)