10-23-2009 11:41 AM
10-23-2009 12:09 PM
When you say "right away" what do you mean. Modbus is a communications protocol, won't get confused, but the hardware you a communicating with might have timing considerations that preclude sending too many messages to quickly. I'm not familiar with that controller (or at least haven't dealt with one in recent memory) so I don't know what its constraints might be. With this being a temperature control, particularly of something that probably has pretty slow response (lots of thermal inertia), so hitting it really quickly with commands probably isn't necessary.
Can you give some quantitative values to how fast you are trying to perform your command/queries?

10-23-2009 01:29 PM
csmrunman wrote:
I am using Modbus drivers to drive Watlow P96 controllers, which control furnaces. The drivers are working great for uploading ramping profiles into the controllers. I would like there to be some code that checks if the furnace temperature is such that a new experiment can run. I have attempted to read from/thru the Modbus driver and the compare the temp to what the starting point of my experiment is (this is done thru file upload of experiment parameters). Essentially, if the furnace temp is too low, heat to the initial temp. If too high, send message to the user that nothing will happens as the furnace cools down. Then if they are equal, then the experiment will run. In my attempts, I believe that the Modbus gets confused because I use it to read, then right away I change and write something. Almost like the drivers race themselves. Any suggestions?
What exactly leads you to that conclusion?
Are you sending commnads form more than one thread?
Provided your code waits for the response of any queries prior to sending new commands there should not be an issue with switch between reading a writing.
NOTE:
Looking for an exact match (equal) between a measured value and a number is like try to catch a photon passing through one slot in a screen. Yes it happens can happen in theory but you will be waiting a long time for an exact match. Instead use your target set point to define a range of values close enough to the target value.
Ben