Hello everyone,
I am running some tests in a CNC, and I want to execute a G-code from a USB connected to the APC, I am using the following hardware and software versions:
5APC1130.185C-000 (with Automation Runtime J4.93)
Acopos P3 - 8EI4X5HWT10
3 EnDat 2.2 encoder servomotors
mappMotion 5.27.1
I have tested it in simulation, adding the CNC_PrgDir to file devices (within CPU configuration), using a path in C:\ to execute a .prg G-code, and it works, now I want to run it from the USB connected to the APC, but if I use F:\ or IF7.ST1 or just IF7 instead of the C path, it doesn’t work. When I use the F:'\ the logger shows the 20708 error (From FileIO library) according to the help, the program doesn’t exist, but I have confirmed that the program is there and the name was correctly written (programName.prg), so, has anybody run a g-code program from a USB?
Regards.
Hi @alejandro.cruz ,
As far as I know in mapp Motion you can configure 2 File Devices for loading your cnc programs, one for real hw and a second one for simulation,
for example:
but not 2 File devices for real hw so at the end you have to copy the cnc programs from USB stick to the File Device CNC_PrgDir.
You cannot assign a fixed file device to a USB stick in Automation Runtime.
I’m sure we have examples on GitHub, for example I found FindUsbStickOnBAndRPlc.
Ciao
Valerio
1 Like
Hello,
In the past there was a syntax to adress an USB-Port direct in the FileDevice Setting, since the USB-Hub Structure got more complex B&R inroduced the Library AsUSB.
With this Library you can get the Information you need for the next Step, creating the FileDevice.
AsUSB
Via the DevLink Function ot the FileIO-Library you can create the FileDevice at Runtime. (This would also work for a Network Resource like a Windows Share Folder with Protocoll CIFS)
MappMotion can be configured to have more than one FileDevice location to search for CNC-Files. In the AxesGroup-Feature Cnc&Robotics Programs you can set up the additional FileDevice which will be created by the FileIO-Library. In this way the system will first search the local FileDevice and then on the USB.
Greetings
Michael
2 Likes
Thanks @michael.bertsch for the clarification, I described a limitation in mapp Motion that doesn’t exist…my bad!
In my prj I have defined those 2 File Devices for loading cnc programs, but as you said I can define more in case I need it.
I think @alejandro.cruz you have to review the case where you plug the USB stick and you want to run a program (from USB stick) and you have another cnc program on your USER File Device with the same name, based on Michael’s comment our cnc will always run the cnc program saved on your USER partition.
Sorry again Alejandro from my comment where I described on mapp Motion a limitation that doesn’t exist.
Ciao
Valerio
2 Likes