Technical FAQs

Ask a Question

Does SoMachine Basic support READ_VAR/WRITE_VAR Functions?

Yes, as of SoMachine Basic version 1.3. Patch 1
Double-click on the function block to open the function properties table.
The %READ_VAR function block has the following properties:
Activated / deactivated checkbox
Indicates whether the address is in use.
%READ_VARi, where i is from 0 to the number of objects available on this logic controller
i is the instance identifier. For the maximum number of instances, refer to Maximum Number of Objects table.
User-defined text
The symbol uniquely identifies this object. For details, refer to the SoMachine Basic Operating Guide (Defining and Using Symbols).
  • SL1: Serial 1
  • SL2: Serial 2
  • ETH1: Ethernet
Port selection
NOTE: SL2 and ETH1 embedded communication ports are available on certain controller references only.
This parameter depends on the link configuration:
  • 1...247 for serial lines slave address
  • 1...16 for Ethernet index
Device identifier
For more details about the Ethernet index, refer to Adding Remote Servers.
The unit is in ms, with a default of 100.
A value of 0 means no timeout enforced.
The timeout sets the maximum time to wait to receive an answer.
If the timeout expires, the exchange terminates in error with an error code (CommError = 01 hex). If the system receives a response after the timeout expiration, this response is ignored.
NOTE: The timeout set on the function block overrides the value configured into SoMachine Basic configuration screens (Modbus TCP Configuration and Serial Line Configuration).
The type of objects to read:
  • %MW (Mbs Fct 3): memory words (default)
  • %I (Mbs Fct 2): input bits
  • %Q (Mbs Fct 1): output bits
  • %IW (Mbs Fct 4): input words
The types of Modbus read function codes are:
  • Mbs Fct 3: equivalent to Modbus function code 03
  • Mbs Fct 2: equivalent to Modbus function code 02
  • Mbs Fct 1: equivalent to Modbus function code 01
  • Mbs Fct 4: equivalent to Modbus function code 04
Address of the first object to read.
  • 0...124 for %MW
  • 0...127 for %I
  • 0...127 for %Q
  • 0...124 for %IW
Number of objects to read
The first address of the word table to which read values are stored (%MW).
User-defined text
A comment to associate with this object.
Was this helpful?
What can we do to improve the information ?