Morning all. Plant manager has decided he wants yesterday's good count sitting in a spreadsheet when he opens his laptop at six, and it landed on me because I'm the one who answers his emails. We've no SCADA here, no historian, nothing. Two of us write the numbers on a whiteboard at the end of shift and somebody types them in on a Friday.
I had a poke around and found a spare PC in the MCC room nobody uses. Tried pointing Excel at the panel with a data connection thing I read about on another forum and got nowhere, I don't think it's meant to do that at all.
Pretty stuck on where to even start. Is a small logger the usual answer here, or does the PLC write the file itself?
> does the PLC write the file itself
Depends entirely on what the PLC is, and you haven't said. A 1769 CompactLogix can't write a CSV anywhere you'd want it. An S7-1500 will, onto its own memory card, and you'd still be walking out there with a laptop to fetch it. So what's in the panel? And is that count already a tag, or does it only exist on the whiteboard?
Fair enough, I don't actually know. There's a red faceplate thing in the main panel with 1769 printed on one of the cards, and a smaller grey one over by the wrapper that says Micro850 on the front. I'll get the proper labels off both tomorrow, it's down for a changeover in the morning.
Count's a tag, pretty sure of that. Operator screen shows it and it goes back to zero at midnight.
If it were a CODESYS target I'd have told you the runtime writes the file itself, SysFile, mount a share and it lands on the PC with no middleman. Plenty of people run it that way. Neither of the two you've named gives you that, so park it. Worth knowing the option is out there, because half of what you'll read online quietly assumes you have it.
Got the labels. 1769-L24ER-QBFC1B in the main panel, v32 on the front of Studio when I went online, and the wrapper one is a 2080-LC50-24QWB. No slot on either that takes a card.
The L24 is the one holding the count. The Micro850 only runs the wrapper.
Right, so that's all on the PC and nothing on the controller. KEPServerEX with the Allen-Bradley ControlLogix Ethernet driver reads the L24 over 44818, and the demo runs two hours at a time, which is long enough to prove it before anyone spends money. The PLC keeps totalising and the PC reads the totaliser once a day and appends a row. Don't let the PC do the counting, it'll be out by a shift the first time someone reboots it.
What's that spare PC running, and is it on the same network as the panel?
Win10, and no. Panel is 192.168.1.x and the office side is 10.44.x. IT handed me a second NIC out of a drawer and told me to sort it out myself, which is about what I expected.
Got the demo installed and it browses the L24 fine when I plug a laptop straight into the switch in the panel. Writing the row is where I've stopped.
Second NIC is the right shape. Leave the office one on 10.44.x with the default gateway and put the panel one on 192.168.1.50 with the gateway box empty, or Windows sends panel traffic out the front door and you lose an afternoon working out why.
For the row itself, the dull answer is the one that keeps running. KEPServerEX has a DataLogger plug-in that writes to CSV on a schedule, no scripting. There's a writeup on this here: https://plctr.com/best-practices-for-plc-data-logging-and-remote-monitoring/
Been running since Monday. Two NICs the way suel said, panel side on 192.168.1.50 with the gateway blank, KEPServerEX reading three tags off the L24, DataLogger dropping a row into a CSV at 23:58. He opens it in Excel at six and hasn't mentioned it since, which I'll take.
What had me stuck was assuming the PLC had to do this. It doesn't. It only has to hold a totaliser that nobody resets by accident, and it was already doing that.
Still don't know what happens to the row if the PC is off at midnight, I guess I just lose the day. Thanks jcasey, suel and kaim.
Nothing wrong with a boring answer that stays running.