02-09-2019 10:16 PM
Hi,
I am looking to see if a device called Labjack can be used with Dasylab. The interest is to interface with another project and also the ethernet connection on these devices.
I understand the script module supports python scripts and I have a python library provided by Labjack. Are there any sample script drivers? I really don't know where to start in terms of what to output in Dasylab and how to setup the channels, blocks, etc. I read through the Dasylab documentation but it really doesn't get me started.
I really want to be able to use the high speed streaming function, but I would start with a modbus script just to get some understanding of how python works with Dasylab.
Anyone have anything they could offer?
https://labjack.com/support/software/examples/ljm/python
Thanks,
-Z
Solved! Go to Solution.
02-11-2019 02:47 AM
Hello
Please have a look at out webseite at
https://www.measx.com/en/products/software/dasylab/examples
Here you can find more examples, some of them more extensive, which require at least a Dasylab 2016.
This download contains examples in the following areas:
Please have a look at it.
Best regards
Stephan
02-11-2019 04:53 AM - edited 02-11-2019 04:54 AM
Additionally, attached you can find two example scripts for data source modules.
serial_com.py asks a device for data, the device answers. The script parses that answer and outputs the example value.
eigene_zeitbasis.py (sorry, the comments are in German language) shows how to provide a time base, so other DASYLab data source modules can output their data synchronously.
The script uses a "virtual device" to generate data on its own. The interface is a simplified API, that provides some basic functions like Open(), Close(), CheckIfDataIsReady(), GetData().
I think you will be able to get the trick on how to talk to you own devices.
02-11-2019 08:56 AM
Stephen,
Thank you for the fast response. I did not notice the examples section of your website.
I tried to download the script example package but I get a 404 error, file not found.
hw70,
Thanks for the example files, I will review. Appreciate the help.
-Zac
02-11-2019 09:42 AM
@zacman55 wrote:
Stephen,
Thank you for the fast response. I did not notice the examples section of your website.
I tried to download the script example package but I get a 404 error, file not found.
Should be fixed, now. https://www.measx.com/downloads/DL_Examples/examples_scriptmodule.14.0.0.480.en.dlp
03-29-2020 12:08 AM
Thanks for the example files. I was able to get data (from 1 AIN channel for now) from the labjack into dasylab. I'm really shocked it started working (since I don't know anything about python), but satisfying to stop getting errors.
There are some pains with adding the library to the Dasylab python folder (since I couldn't get the local pip to work, bigger issues with my path since I have python also installed on the windows machine).
If anyone is interested in the code I can share.
07-15-2021 05:02 PM
LabJack has greatly expanded our support for DASYLab. Since you previously asked about DASYLab I wanted to bring it to your attention in case you missed our recent email newsletter or support updates.
https://labjack.com/support/software/examples/ljm/dasylab