You don't have to connect to a phone book, for example, and yet you can read data...
But with S7 protocol, you have to. That's a choice Siemens made. It's "human convention", something somebody established at some time. Like driving on the left or right side. But daveNewConnection does not connect. This is done later in daveConnectPLC().
dc=daveNewConnection reserves memory for the data dc points at. If you don't do, how wil you use functions like daveRead(dc, ...) which expect a pointer to dc as their 1st parameter?
If you really want to avoid malloc() and heap memory, you can declare a global variable:
I am not sure whether daveNewConnection() initializes some fields. Look into source code. And if so, copy the initializing code into your program.
After that, you can pass &myDC to any function expecting a pointer to
daveNewConnection uses the following parameters; an interface, MPI, rack, and slot. Which initializing code should I copy into the program?