It is not only possible to transfer numbers to the ToolScope (program numbers, etc.) but also strings (e.g. program name). This article is about the general way of writing those strings from a fieldbus master to a ToolScope.
General proceeding for writing strings from a fieldbus master to the ToolScope
As only a limited number of bytes are available in the Profibus image, but a wide range of strings can be set, the strings are set by indirect addressing. The transfer mechanism is the same in the small Profibus image as in the large Profibus image. However, the corresponding bytes are in different positions in the different field bus images.
The actual transfer works such that:
- The string to be transferred is selected/addressed as a number
- The actual string is saved
- The actual transfer is triggered by setting the "Take over" bit
- An acknowledgment by the ToolScope is expected; ToolScope acknowledgment takes the form of a change/increment in a certain PLC input byte
All strings are resetted to be empty by adressing the virtual String #10.
This process can generally only be implemented as a step sequence / State Machine. For details, please see our interface description, implemented in Excel.
Example string transmission for 8-channel Profibus image
Example of setting the string "TEST" as the program name for channel 1:
- (Assumption: Output bit 229.0 is LOW to begin with)
- In one step: Output byte 72 to 128 (program name), output byte 73 to 0, from output byte 74 save a zero-terminated string "Test" of max. 32 characters (i.e.: Output byte 74 to 84 ('T'), output byte 75 to 69 ('E'), output byte 76 to 83 ('S'), output byte 77 to 84 ('T'), output byte 78 to 0 (string termination), output bit 229.0 to HIGH
- Wait until input byte 72 changes
- Output bit 229.0 to LOW
During a reset status, all strings should be deleted. Example for the large Profibus image:
- Output byte 72 to 138 (delete all strings), output byte 74 to 0, output bit 229.0 to HIGH
For channel 2, the program name can be transferred by setting output byte 72 to 148. To delete this string, set output byte 72 to 158.
For channel 3, the program name can be transferred by setting output byte 72 to 168. To delete this string, set output byte 72 to 178.
The same applies to channels 4 to 8.