DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Labjack and Python Drivers

Labjack and Python Drivers

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 5
(293 Views)

Re: Labjack and Python Drivers

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 5
(250 Views)

Re: Labjack and Python Drivers

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
Message 3 of 5
(245 Views)

Re: Labjack and Python Drivers

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 5
(238 Views)

Re: Labjack and Python Drivers


@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 5
(232 Views)