T7 sends out its pulses as it should by doing this.
It works without ' WAIT_US_BLOCKING', which we have tested by out commenting the part in the code containing aNames(5)=' WAIT_US_BLOCKING' and aValues(5)=100, redefine NumFrames from 7 to 6, and removing one entry from aNames and aValues, such that num 6 and 7 becomes 5 and 6. The only thing edited in the code is the ethernet address of the LabJack.
''LabJack.LJMExceptions: LJME_OLD_Firmware, Error in using: (code line containing ()), Messeage: LJME_OLD_FIRMWARE, Source: LabJack.LJM'' NET version 4.0 and matlab 2013b. Our problem is that we can't seem to make the 'Wait' routine work. When using your example code 'eWriteNames.m' it reports the error: We have bought your LabJack T7, and installed it, and we are able to control it from our computer through Ethernet connection. We have a problem that we hope that you can help us with. MATLAB_LJM_2017_12_04.zip contains: LICENSE.txtĮxamples\More\Config\ReadDeviceNameString.mĮxamples\More\Config\WriteDeviceNameString.mĮxamples\More\Ethernet\ReadEthernetConfig.mĮxamples\More\Ethernet\WriteEthernetConfig.mĮxamples\More\Stream\StreamBasicWithStreamOut.mĮxamples\More\Stream\StreamSequentialAIN.mĮxamples\More\Watchdog\ReadWatchdogConfig.mĮxamples\More\Watchdog\WriteWatchdogConfig.m eReadName (handle, name, 0 ) disp ( 'eReadName result:' ) disp ( ) catch e
OpenS ( 'ANY', 'ANY', 'ANY', handle ) %Call eReadNames to read the serial number from the LabJack. Handle = 0 try %Open first found LabJack = LabJack. Stream mode and other operations that don't fit in "Write Read Loop with Config" will usually have specific examples, and if something seems to be missing let us know.Ĭode Snippet %Make the LJM. Or just use "Write Read Loop with Config", which provides the basic structure used by many user applications.
Most operations simply involve writing and reading different registers, so you really just need examples that show you how to write and read any register. The reason for this stems from the "Overview" section above. You will find lots of examples in this archive, but there is not an example for everything the LabJack can do. The following examples in the Basic folder are a great place to start: Look at the device's datasheet ( T7 or T4) or the Modbus Map to determine what registers you need to write and read, then use eWriteName (or eWriteNames) to write the desired registers and eReadName (or eReadNames) to read the desired registers. no issue loading MainAssembly in simple console program above ).With the LJM library, pretty much everything you might want to do with a device is accomplished by writing and/or reading some registers. I also tried modifying file (in matlab installation folder) to the following : Īnd restarting matlab, but it still fails to load the MainAssembly and I can't see what's wrong (i.e. I'm using matlab R2015b and R2019a and targeted frameworks by the assemblies are the following:
NET Framework 4.0) and I have no issue loading the main assembly: static void Main(string // Works fine !!! I tried a simple console program in C# (targetting. File not found.īut if try to load this sub assembly by its own it is ok: NET.addAssembly(fullfile(fold, 'SubAssembly.dll')) % No issue !!! Returns Could not find 'SubAssembly, Version=3.0.58.0, Culture=neutral, PublicKeyToken=e33b67d3bb5581e4' or or one of its dependencies. If (isa(ex, NET.NetException) & isfield(ex.ExceptionObject, 'LoaderExceptions'))Įrror(char(ex.(0).Message)) NET.addAssembly(fullfile(fold, 'MainAssembly.dll')) I have a strange issue while loading some assembly of mine in Matlab: function = foo()įold = 'c:\FolderWithAllAssembliesAndDependencies'