I want to download logic to the following PLCs by a simple command line without having to open the programming software:
1. Siemens S7-300
2. Allen-Bradley ControlLogix\CompactLogix
3. Modicon M340
Is it possible, and how?
Unity Pro Loader will download a selected file to a compatible PLC. This includes Quantum, Momentum, M340 and M580 PLCs. The loader is a standalone app that can also be used to update PLC executive firmware. Uses Ethernet, USB or serial connections.
I'm not entirely sure what you're trying to do but probably the simplest way to download to a compact Logix is by setting up an SD card to automatically download when it Powers up. Just put the SD card in and turn the power on and it will upload from the SD card into the plc. I don't recall the exact steps on doing this because I don't like using the SD card just because I don't like it but I know it can be done.
If you really insist on doing it from software you still have to buy the programming software. You can create a macro that does the downloading. I think you can just make a macro recording to do this. Then you save the macro and you can tell the software somehow when it starts up to execute a particular macro. It's kind of a convoluted thing in more trouble than it's worth probably and it won't save you the cost of buying the software if that's what you're trying to avoid.