Summary
Data are retrieved from the specified offset of the string according to the length of the string and stored in another data buffer. Store Parameter 4 (Number of words) from Parameter 3 (String Offset) of Parameter 2 (String) in Parameter 1 (Destination buffer).
Format
_strmid (Destination buffer, String, String Offset,
Number of words)
Parameter 1: Data Buffer
Parameter 2: String, Data Buffer
Parameter 3: Numeric value, Internal Device, Temporary address (The valid range for Parameter 3 is from 0 to 1024.)
Parameter 4: Numeric value, Internal Device, Temporary address (The valid range for Parameter 4 is from 1 to 1024.)
Example expression:
_strmid (databuf0, "12345678", 2, 4)
4 bytes of data retrieved from offset 2 of string "12345678" are stored in "databuf0".
When attempting to retrieve a string longer than the string specified with the "strmid ( )" function, or when specifying an offset value greater than the specified string, error Number 3 (string extraction error) of the string error status [e: STR_ERR_STAT] is issued.
The processing is terminated when an error occurs and returns to the beginning of the Main function. (If the command comes while a function is running, it returns to the line that called that function.)