motohawk_upgrade_modbus
The motohawk_upgrade_modbus M-script converts a MotoHawk™ model containing the Modbus Bolt-On blockset, to a model using
native MotoHawk blocks. The native blocks are available from MotoHawk version 2023a.
System
This upgrade script operates on the provided system (or bdroot if not provided) and replaces references of the old block with the MotoHawk proper counterpart.
FollowLinks
The script will also check linked libraries for instances of the old block. If any of these blocks are found, the user is prompted whether or not it would be
appropriate to update the found linked library.
To disable updating of linked libraries, 'FollowLinks' can be set 'off.' Note that if any optional arguments are passed, the system to operate on must be provided.
PromptMode
To globally approve updating of linked libraries, set 'PromptMode' to 'off'. Default is 'on'.
Upgrade Notes
- Modbus Server blocks should upgrade without any additional changes.
- The Modbus Client blockset design has changed from the bolt on. Previously, a request block included the response as a port output.
- New behavior is for a request block to send a request, and a separate response block will retrieve the reply.
- Old "Read", "Write", "Mask" blocks will be translated into a "Request" set to the correct type of request (i.e. coils, holding etc),
and in addition for "Read" requests a "Response" and "Trigger" block will be added to your model or library near each "Request" block.
- The "Response" blocks should be moved into a subsystem triggered by the associated "Trigger" and the data port hooked up as needed.
- Previously there was an option to scale the results to engineering units. This has been deprecated and the scaling should be added at
the simulink layer as required.
- Mask Holding Register will need careful checking that the correct input ports are used after the block is replaced.