Menu

#20 Enum communication problem between EpicsSharp and ControlSystemStudio

1.0
accepted
ENUM (1)
2017-06-19
2017-06-07
No

Hi all
do you know of any problem between EpicsSharp and Python during enum PV access?
I can correctly get the value of an ENUM variable from caget, but in Python I got an unexpected datatype (time enum). I am using the pv.type attribute described here ( http://cars9.uchicago.edu/software/python/pyepics3/pv.html ) to get the PV information. I have the same problem using the Epics implementation in ControlSystemStudio.

Thanks a lot
gigi

Related

Tickets: #20

Discussion

  • Daniel J. Lauk

    Daniel J. Lauk - 2017-06-08

    Hi Gigi

    I am not aware of any issues, but I can have a look.
    Can you provide a minimal, complete, and verifiable example for both the Python and .NET parts, please?

    Thanks
    DJ

     
    • Pierluigi Fumi

      Pierluigi Fumi - 2017-06-08

      Hi Daniel, thanks a lot for the fast reply. I can prepare both example
      for you, I'll let you know in the next days.

      Many thanks
      gigi

      On Thu, Jun 8, 2017 at 11:03 AM, Daniel J. Lauk djlauk@users.sf.net wrote:

      Hi Gigi

      I am not aware of any issues, but I can have a look.
      Can you provide a minimal, complete, and verifiable example for both the
      Python and .NET parts, please?

      Thanks
      DJ


      [tickets:#20] Enum communication problem between EpicsSharp and
      ControlSystemStudio

      Status: open
      Milestone: 1.0
      Labels: ENUM
      Created: Wed Jun 07, 2017 03:13 PM UTC by Pierluigi Fumi
      Last Updated: Wed Jun 07, 2017 03:13 PM UTC
      Owner: Alain Bertrand

      Hi all
      do you know of any problem between EpicsSharp and Python during enum PV
      access?
      I can correctly get the value of an ENUM variable from caget, but in Python
      I got an unexpected datatype (time enum). I am using the pv.type attribute
      described here ( http://cars9.uchicago.edu/software/python/pyepics3/pv.html
      ) to get the PV information. I have the same problem using the Epics
      implementation in ControlSystemStudio.

      Thanks a lot
      gigi


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/epicssharp/tickets/20/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #20

    • Pierluigi Fumi

      Pierluigi Fumi - 2017-06-08

      Hi Daniel
      I put online here
      https://drive.google.com/open?id=0B2L2AJOmDzkbeVhoQ1RzY1ItZk0 a zip
      containing:

      • the python script that fails
      • the source of the .Net project. It contains both the source of my
        program that uses the enum (TestEpicsEnum) and the epicssharp server
        sources (the nuget package is not updated to the last version and it
        does not handle the enums).

      The .Net program has a timer that updates on a textbox the value of
      the enum PV. You can change the value of the PV by pressing a button
      on the form, or by using the caput functionalities (I put two
      textboxes to copy/paste on the commandline).

      The python script ticket_20.py tries to update the value, but it
      fails. This is the error I get:

      python ticket_20.py
      EpicsSharp ticket 20 test case.
      Process variable: PMA:TRPD:COMMAND
      0 = STOP
      1 = START
      C:\Users\ut\AppData\Local\Programs\Python\Python36\lib\site-packages\epics\ca.py:1435:
      UserWarning:
      ca.get_ctrlvars('PMA:TRPD:COMMAND') timed out after 5.00 seconds.
      warnings.warn(msg % (name(chid), timeout))
      Traceback (most recent call last):
      File "ticket_20.py", line 13, in <module>
      pv.put("STOP", wait=True)
      File "C:\Users\ut\AppData\Local\Programs\Python\Python36\lib\site-packages\epics\pv.py",
      line 332,
      in put
      if value in self._args['enum_strs']:
      TypeError: argument of type 'NoneType' is not iterable</module>

      Thanks a lot
      Bests,
      gigi

      On Thu, Jun 8, 2017 at 11:03 AM, Daniel J. Lauk djlauk@users.sf.net wrote:

      Hi Gigi

      I am not aware of any issues, but I can have a look.
      Can you provide a minimal, complete, and verifiable example for both the
      Python and .NET parts, please?

      Thanks
      DJ


      [tickets:#20] Enum communication problem between EpicsSharp and
      ControlSystemStudio

      Status: open
      Milestone: 1.0
      Labels: ENUM
      Created: Wed Jun 07, 2017 03:13 PM UTC by Pierluigi Fumi
      Last Updated: Wed Jun 07, 2017 03:13 PM UTC
      Owner: Alain Bertrand

      Hi all
      do you know of any problem between EpicsSharp and Python during enum PV
      access?
      I can correctly get the value of an ENUM variable from caget, but in Python
      I got an unexpected datatype (time enum). I am using the pv.type attribute
      described here ( http://cars9.uchicago.edu/software/python/pyepics3/pv.html
      ) to get the PV information. I have the same problem using the Epics
      implementation in ControlSystemStudio.

      Thanks a lot
      gigi


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/epicssharp/tickets/20/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #20

  • Daniel J. Lauk

    Daniel J. Lauk - 2017-06-08
    • assigned_to: Alain Bertrand --> Daniel J. Lauk
     
  • Daniel J. Lauk

    Daniel J. Lauk - 2017-06-19
    • status: open --> accepted
     
  • Daniel J. Lauk

    Daniel J. Lauk - 2017-06-19

    Thanks for the example(s). I did some digging and it turns out, enums have not received sufficient attention previously.

    I'll update this issue as soon as I have a solution to offer.

     

Log in to post a comment.

MongoDB Logo MongoDB