Jump to content

How to input Class type to python node


Recommended Posts

I want to run a python node to call my python script. The function name is 'setupInf(InfDevice.FTDI_D2XX_MPSSE_SPI, True)', where the 'InfDevice' is an enum type, defined as 

class InfDevice(CtypesEnum):
    FTDI_D2XX_MPSSE_SPI = 0
    FTDI_D2XX_FPGA = 1
    ...

My question is how to pass this class type data (InfDevice.FTDI_D2XX_MPSSE_SPI) to the python node? Thank you in advance. 

image.png.3bd56c4735586ed999d67f990522be2b.png

 

Link to comment
  • 2 weeks later...
On 9/28/2021 at 9:47 PM, Hello183 said:

I want to run a python node to call my python script. The function name is 'setupInf(InfDevice.FTDI_D2XX_MPSSE_SPI, True)', where the 'InfDevice' is an enum type, defined as 

class InfDevice(CtypesEnum):
    FTDI_D2XX_MPSSE_SPI = 0
    FTDI_D2XX_FPGA = 1
    ...

My question is how to pass this class type data (InfDevice.FTDI_D2XX_MPSSE_SPI) to the python node? Thank you in advance. 

image.png.3bd56c4735586ed999d67f990522be2b.png

 

It's just an integer value. You can either just pass 0, 1 etc to that parameter or create in LabVIEW an enum that has these values assigned to the individual enum values. What doesn't work?

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.