I am not great with Siemens and Profibus so looking for some advice.
I have a project where I need to communicate approximately 20 status words (bi-directional) with a customer’s PLC on the line.
Can I do this directly with the 315-2 PN/DP processor or do I need to add 6ES7158-0AD01-0XA0 DP/DP coupler?
Short version: you probably can do it directly (depending on the setup), but the DP/DP coupler is a great solution. I see the PN equivalent used all the time.
Long version:
It depends how the network is structured and how often you need to communicate the data.
Are all the PLCs on the same DP network? If so, you can communicate directly. If they are all different DP networks, then you either need a CP card or a coupler.
There are also two different mechanisms for communicating. You can use cyclic comms, which are good for sending smallish amounts of data (less than 256 bytes, so this is probably a good choice for you) very often (IO scan update rate). Minimal code effort here, it just uses the standard IO table, and is my preference. You can also use acyclic comms when you want to send larger chunks of data (up to tens of thousands of bytes) only occasionally. This is done via send/recv blocks.
For cyclic comms, if you aren't using the DP port for anything else and you are on the same DP network, you can set it to be an I-Slave and have it directly be a slave of the other controller. Otherwise you can use a DP-DP coupler (or a CP card). One note with those: they have two sides, and you MUST use one side in one project, and the other side in the other project. If both controllers have the left side in the HW config, it won't work.
For acyclic comms, there are a number of blocks available, dependng on what you want to do. You'll need to create a connection (in Net Pro, if using Simatic Manager), and then assign the blocks to that connection. Put/Get are the simplest, but they don't give acknowledgement. B_send/B_recv are the blocks I most often see used.
edit: JRW solved the problem with a couple sentences in the time I wrote an essay. I think there is an important lesson here.