09-12-2007 06:14 AM
Hello,
Newbie is struggling looking for pointers.
Reference the following link for MP530 protocol information and
examples of serial communications that are occurring:
http://forums.ni.com/ni/board/message?board.id=140&message.id=25628
Attached:
A) my current application revision 20070912
B) Portmon outputs (Viewing HEX) from my current apps start, run, and closure.
Questions:
Thank you for your time.
jqm
10-30-2007 07:01 AM
10-30-2007 09:33 AM
10-31-2007 08:37 AM
Dennis,
Thank you
for your response and the time you took to post a suggestion.
I just tried the file and unfortunately the output still toggles between a multimeter reading…. And “0”.
Just like the bytes read toggles from 22 to zero, with the read meter HEX string toggling from a ascii string to blank
I have attached a new Portman file
Any ideas on how to stop the output from toggling?
Thanks
jqm
10-31-2007 09:11 AM
10-31-2007 09:24 AM
You could place a case statement around the VISA Read and the conversion code. If byte count is greater than zero, do the read and conversion. I'm not sure why there would be zero bytes at times. Could it be that the meter is just not capable of whatever speed you are running at?
You could also take out the two VISA Flush Buffer functions at the beginning. As long as you read all of the bytes, you should not need to keep flushing. Since it appears that the instrument always sends 22 bytes, you could alos try removing the VISA Bytes At Serial Port and using a fixed byte count for the VISA Read. If the instrument is being read too fast though and sometimes doesn't return a value, this would not be a very good idea.