beautypg.com

Yaskawa MotionWorks IEC Toolboxes User Manual

Page 196

background image

Communications Toolbox: Function Blocks

MotionWorks IEC61131-3 Toolboxes: 2013-09-13

183

This examples demonstrates how to write a program to send a continuously updated metrics file (with date and
time stamp) to an FTP server. This kind of functionality is extremely useful to applications requiring data
acquisition as the need to connect to the controller directly is eliminated and file management is handled by the
controller. For this example, the controller will continuously sample the speed and position of a servo that is
jogging and the store the contents in a CSV file using the File_RW Toolbox.

The same data configuration structure was used but there is no preset message for the file as it will be created
dynamically.

In addition to the Communications Toolbox, two additional Yaskawa toolboxes are used: File_RW_Toolbox and
PLCOpen_Toolbox. The File_RW_Toolbox is used to create the CSV file that is uploaded to the FTP server and
the PLCOpen_Toolbox is used to control the single servo used in this example.

Controlling this example is very simple. The servo is turned on by "ServoEnable" which then in turn starts the
jog at a constant velocity. The rest of the example is controlled in the main program: