|FORTE - Matlab TCP/IP communication [message #1764178]
||Fri, 26 May 2017 12:41
| Marc Jakobi
Registered: April 2017
I just finished working on a Matlab class that enables the communication between Matlab and SERVER/CLIENT function blocks running on FORTE.|
Since you have all been so helpful with my questions in the last few weeks, I would like to share my work with anyone in the community who may find it useful for validating IEC 61499 applications using Matlab simulations.
It uses only Matlab code and extends the tcpip class with wrapper methods (designed to match the FB interface) which automatically translate Matlab data types into byte-data that FORTE CSIFBs can understand and vice versa.
(uint8 <--> USINT; LREAL <--> double, etc. - currently, only numeric data types, BOOL, DATE_AND_TIME, STRING and WSTRING are supported).
A brief documentation can be found in the readme and some demo applications (system exports) that are designed to communicate with the Matlab object are provided along with a corresponding Matlab demo script. I will eventually update it in my free time.
- I added support for transferring between Matlab datevec (a 6x1 double vector date/time format) and DATE_AND_TIME.
- Multiple STRING and WSTRING inputs and outputs at any positions are now possible.
- Using WSTRING issues a warning message because Matlab does not support wide chars and the usage has not been extensively tested.
- Added support for arrays (numeric data types, logical and DATE_AND_TIME. Only LREAL arrays have been tested extensively so far).
- Added reqNorsp() method for the purpose of sending data, performing computations in Matlab and then awaiting a response. See updated readme for usage example.
[Updated on: Wed, 28 June 2017 09:49]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03225 seconds