DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Labjack and Python Drivers

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(7,469 Views)

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:

  • Dialog, user interface
  • Channel types, channel flags
  • Channel relation
  • Channel flag “Short Block”
  • Mathematics
  • Access to global DASYLab variables

Please have a look at it.

Best regards

Stephan

measX GmbH
www.measx.com
Message 2 of 7
(7,426 Views)

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.

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
Download All
Message 3 of 7
(7,421 Views)

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

0 Kudos
Message 4 of 7
(7,414 Views)
Solution
Accepted by topic author zacman55

@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

0 Kudos
Message 5 of 7
(7,408 Views)

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.

 

 

 

0 Kudos
Message 6 of 7
(6,492 Views)

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

 
0 Kudos
Message 7 of 7
(5,014 Views)