Plotting graph in real time

I am sending arduino a value for focus measure (0-255).
Depending on the value the voltage sent will change in order to change the focus measure value.

Can a graph be plotted from the voltage that is being return from the output to the arduino, and the focus measure value defined in real-time? Is there a coding for it?

Can a graph be plotted from the voltage that is being return from the output to the arduino

What is the Arduino doing with the value that you send it? How does that value translate to voltage? Voltage on what pin? How is that voltage supposed to get returned? To where?

If the value being sent is being used to PWM a pin, why is there a need to send that number back to the PC?

PaulS:

Can a graph be plotted from the voltage that is being return from the output to the arduino

What is the Arduino doing with the value that you send it? How does that value translate to voltage? Voltage on what pin? How is that voltage supposed to get returned? To where?

If the value being sent is being used to PWM a pin, why is there a need to send that number back to the PC?

Arduino reads the value sent, if it is above or below the optimum focus measure value defined it changes the output voltage in increments. The voltage is sent through PWM pin and passes through an op-amp.

Not sure which pin should return to arduino for it read the voltage, or what coding to use.

Eyedeal:
Arduino reads the value sent, if it is above or below the optimum focus measure value defined it changes the output voltage in increments. The voltage is sent through PWM pin and passes through an op-amp.

Not sure which pin should return to arduino for it read the voltage, or what coding to use.

Sorry, I can only make the vaguest sense of that. I have the idea that you are receiving an input voltage and trying to steer it towards a target value, but beyond that it's a mystery. Do you want the Arduino to inform the PC about values being 'sent' (how? from where?) to it, or the 'output voltage' the Arduino is generating (via PWM from the sound of it)? If you want the Arduino to communicate with the PC and assuming it is connected to the PC via USB and assuming that the Arduino somehow has the data you're interested in then you have the option of printing the values to the serial port - I have no idea whether that approach makes sense in this context because I'm struggling to guess what's going on.

Eyedeal:
Can a graph be plotted from the voltage that is being return from the output to the arduino, and the focus measure value defined in real-time? Is there a coding for it?

I don't know what you want to do but there is probably no need to know. If you have data to graph and the PC connection to do it, which I assume is the case, then yes. No coding is needed, other than the usual serial.print commands and some formatting commas. It can be done using the Excel macro PLX-DAQ, which give a real-time graph over a predetermined period.

I'm sure you could do it with an on-board graphic LCD display too, but I don't know anything about that, and the above suffices.