10-15-2015 07:14 PM
Hello,
Has anyone every tried using pyVirtualBench, a python wrapper for virtual bench? If so, how is it working for you?
10-16-2015 03:41 PM
Hello niColleen,
Maybe you could also try asking this question on the pyVirtualBench community:
http://community.armstrap.org/
10-23-2015 01:50 PM
Thanks, Daniel.
I was more trying to see if anyone was able to get the example code to work.
I tried running any of the example code and I got the following error:
Error/Warning -375941 occurred
NI-VirtualBench: Unable to find device.
Device Name: myVirtualBench
I was able to find the VB device using the executable bench software, but not using the python wrapper. So just wondering if anyone had tried this code and had any issues.
Thank you.
- C
10-23-2015 04:20 PM
You will probably need to replace "myVirtualBench" with the name of your device.
By default, the device name is the model number and serial number separated by a hyphen; e.g., "VB8012-309738A".
You can see the device's name in the VirtualBench Application under File->About.
11-04-2015 06:33 PM
Thanks Brandon. That solved the issue for running several of the example cases, but for the i2c example I'm still having some issues.
File "pyvirtualbench.py", line 2120, in write_read
status = self.nilcicapi.niVB_I2C_WriteRead(self.instrument_handle, c_char_p(str(write_data)), c_size_t(len(write_data)), c_double(timeout_in_secs), c_pointer(number_of_bytes_written), byref(read_data), c_size_t(read_data_size))
NameError: global name 'c_pointer' is not defined
I don't think there's a c_pointer in python in ctypes. Any thoughts?
Thanks!
11-04-2015 06:51 PM
The C API definition has that as a pointer to a signed 32-bit integer:
niVB_Status NIVB_DECL niVB_I2C_WriteRead( niVB_I2C_InstrumentHandle instrumentHandle, const uint8_t* writeData, size_t writeDataSize, double timeout, int32_t* numberOfBytesWritten, uint8_t* readData, size_t readDataSize);
I think, looking at the ctypes documentation, that in place of "c_pointer(number_of_bytes_written)" that should be "byref(number_of_bytes_written)".
You may want to consider filing an issue about it on the pyvirtualbench github project.
07-05-2018 07:54 AM
Someone please answer this question ...
I am also getting same problem...
plz post the Video regarding that ...
Thanks in advance.
01-13-2019 08:27 PM
http://community.armstrap.org/ could not opened