Jump to content

meubanks

Members
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by meubanks

  1. I don't think I can attach the .dll itself since it isn't my code, but I think I can reasonably share the relevant snippets. First, I'd like to clarify that the manufacturer provided example code in Python, which works fine. I've tried this both using the wizard, and Call Library Function Nodes. I must say, I don't really understand the wizard at all, as it seems to make no attempt to actually parse the provided .h file (it complains about missing preprocessor definitions, which as far as I can tell are already in the .h file, and it complains about e.g. windows.h not being found, even when I explicitly add its complete path to the "Include Paths" section). Tbh I'm not remotely sure what, if anything, I need to add to includes and preprocessor definitions. Using the Function Node, LabVIEW immediately crashes, despite my attempt to follow the examples (see my .vi). Here's the key call which works in Python: pcproxlib.usbConnect.restype = ctypes.c_short rc = pcproxlib.usbConnect() if rc == 1: rawData = "" buffer_size = ctypes.c_short(32) pcproxlib.GetActiveID32.restype = ctypes.c_short # create a buffer of given size to pass it # to get the raw data. raw_data_tmp = (ctypes.c_ubyte * buffer_size.value)() #as per documentation 250 millisecond sleep is required # to get the raw data. time.sleep(250/1000.0) nbBits = pcproxlib.GetActiveID32(raw_data_tmp , buffer_size) pcproxlib.USBDisconnect.restype = ctypes.c_short pcproxlib.USBDisconnect() I've attached the .h file, and the .vi file of my failed attempt at using the Function Node. How on earth is one supposed to figure all this out de novo? pcProxAPI.h pcProxAPI test.vi
  2. This is for a quick drop plugin, and I'm getting my references from the panel selection list. Generally, I use a "To more specific class" to get specific class reference type and thus the appropriate methods or property nodes, based on the ClassName. The ClassName I'm getting is "Property". The problem I was having is that I couldn't find the specific class I needed for the "To more specific class" function. The answer is, Generic->GObject->Node->Growable Function-> Object Function->Property. From there you get the PropertyItems[] list via property node and iterate through that, toggling the IsWrite property.
  3. What was the answer here? I'm trying to figure out the same exact thing.
×
×
  • Create New...

Important Information

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