Hello John:
First which S7?
S7-200 can be a modbus slave on a EN231 modem module, and can be set as Modbus master or slave through a code library that you can add to the programming software.
S7-300/400 CPUs can be set as Modbus master or Slave through a serial processor (CP340/CP441-2), with a (expensive) "lodable driver" package and integrated function blocks.
Then you have to match the addresses used by the Modbus functions you are starting/responding to. Say your S7 is a slave, and the Foxboro requests 4 data values through Function 4 starting at address 10; where in the S7 memory do you match these addresses?
The different manuals will help you calculate this. In a S7-300 slave, you would start at DB900.DBW0 (the specified start DB for Function 4 data) and then use a math formula provided to calculate the offset from that address for you to place the data requested by the master.
There are different start DBs and offset calculations for other Modbus functions.
Sounds complicated? Not really, that is what setting up a lookup table involves. And once you have studied the address calculation algorithm they provide, it is quite straight mapping.
Hope this helps,
Daniel Chartier