MpDataRecorder and how to specify path of file

Hello everybody,

I try to use MpDataRecorder to save some variables into the USB drive. The USB drive is dynamically managed thanks to the mappFile from mappFramework package (very impressive)

The plugged USB drive obtains the ‘USB1’ device name. If this string is applied to DeviceName parameter of MpDataRecorder FB - everything is OK and the CSV files are saved into root of drive. But I am not sure, how to specify different file path to save CSV files into existing directory?

Thanks for help in advance

Martin.

You need to create a new FileDevice that points to the folder and use that.

You can use the existing file device as the start, so specifying

'/DEVICE=USB1/FolderName/FolderStructureAsIWant/'

Should point to your USB drives root /FolderName/FolderStructureAsIWant

Then just pointing that newly created filedevice to your MpDataRecorder should achieve what you want.

Of course you should then create / destroy the file device with DevLink / DevUnlink when the USB drive is attached and removed.

Automation Help: DevLink
Automation Help: DevUnlink