Who will be calling this function? Is there any chance this function can be called more than once in a single task iteration? Is it possible to request a write at one address and then immediately request another write at another address? If so, I think the second write request will overwrite the first - you would need to add a write request queue that the write state machine could handle one job at a time.
*if there are other places as we talked please update them with that as well.* *please define the QSTring variable on top of the function and then used that variable (aka move your private variable in the function scope)*