Good Morning Folks,
    Well with a bit fewer hair on my head I found what was causing my program to fail to get good data in my 9-bit serial scheme here. My initial transmit to the device under test is with the MARK parity set to tell the devices on the RS-485 "bus" that it is an address. I then go into my receive mode of my state machine, change the parity to SPACE (or none) and try and receive any responses. I made the mistake of underestimating how fast (particularly as I have only one device connected) this might be. The latency of exiting my state machine (it is in an "action engine"), re-entering, changing parity and _then_ doing the read was too much time, with the receive buffer having anywhere from some to all of the returned data already there, producing garbage. I moved the parity switch to righ after the VISA Send call and now get all but the first byte reliably. That first one will get inccorectly read about 40% of the time. I haven't made an executable yet to see if it improves the response times even more,...
 
Thanks for those have already sent their suggestions, nothing that helped specifically, but I always store those answers in my memory in anticipation of future problems!
 
Happy wiring and a good weekend to all,
Putnam Monroe
Senior Engineer
Summit Technology

Reply via email to