LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

MathScript User-Defined Function with Multiple Methods and .dll files

I want to use the wagoNModbus.m function within LabVIEW to control a series of solenoid valves from a WAGO 750-841 PLC. (See link to download the Matlab file under "Valve Control Software" at: https://sites.google.com/a/lbl.gov/microfluidics-lab/valve-controllers/wago-controller). The function uses the public modbus library and the associated .dll files are currently stored in a sub-folder in the same folder with wagoNModbus.m.  This function defines several Methods, which are called, e.g., by the test script:  wago_object_test.m, which can also be downloaded from the link above. I have noted a comment that sub-functions within a function are only accessible within the main function (http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/mathscript_function_syntax/), but do not know whether this would also apply to the Methods defined by wagoNModbus.m? Do I need to break out each of these Methods and save them as separate functions?

 

Also note, .m is not a valid file extension for attachments on these message posts! Someone should fix that...

0 Kudos
Message 1 of 3
(6,165 Views)

Hello KMU,

 

Thanks for the heads up on the .m file. For reference, here is a list of the LabVIEW MathScript Known Issues and Limitations, but as a general rule the methods should work correctly. One thing to note anytime importing a third-party .m file is to confirm the syntax against the functions list in the LabVIEW 2012 MathscriptRT Module Help.

 

An easier approach might be to utilize this example LabVIEW project that WAGO provides that demonstrate simple socket connections to the WAGO Controller. 

 

Thank you,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 2 of 3
(6,086 Views)

I gave up on the MathScript and was responsible for WAGO finding the example files you mention, which had broken links. I've adapted that approach for my application and it works great. I'm still curious about the problems with the MathScript function, but don't have the time to chase it down further at this point.

0 Kudos
Message 3 of 3
(6,081 Views)