Okay i solved it. I was writing the file path as $USBDev$ but I had to write it as $$USBDev$$.
Hello to everyone, I want to read a text file from usb flash disk connected to plc in Codesys. I can see usb device and text file in Device/Files section in Codesys. But I cannot read the text file in the LADDER diagram. Thanks in advance for your help.