12-21-2020 12:59 AM
I am trying to communicate with my new instec mk2000 temperature controller connected to COM port. In NI-MAX i/o test, I am getting inconsistent output for read. Sometimes it gives correct output for *IDN?\n and sometimes i get errors like ''invalid character",''undefined header",''time-out''. Sometimes I also get output for a previosly sent command when new command is sent.
port settings are set to
Baud rate: 9600
Data bits: 8
Parity: Even
Stop bits:1
Flow control:none
Simple Call device program in Labview is showing time-out error everytime.
Please help. I am clueless....!!!
Thanks in advance
Solved! Go to Solution.
12-21-2020 03:01 AM
I suspect a very slow interface on the mk2000 interface. Not for sure but try to write the characters to th mk2000 one by one.
Build a special write slow.vi in which a for loop sends each character one by one instead of a complete string. I've seen this a few times loooong ago.
And post the testvi to get comments.
12-21-2020 03:33 AM
Thanks for the response. I will do as you said and post later.
12-21-2020 07:00 AM
Hello Albert, I tried to do what you said. I converted string into array of characters and fed it to For loop. For every character, it shows the same error that it shows when whole string command is fed at once. Here are shot of the Program and output. Is this what you said ( I am a beginner ). What should I do ??Block Diagram
Front panel
12-21-2020 09:49 AM
12-22-2020 12:42 AM - edited 12-22-2020 12:56 AM
Hello Albert.
I change it like you have suggested. I have also added a new line command to every command as suggested by someone.
Good news is it works.
But, a wrong command or an error creates a lag between command and output thereafter. In this picture you can see that I am getting the output for current temperature command when i called for *idn? . Current temp command was called before *idn? but got an error. Why is this so ??
With best regards and warm wishes for coming holidays...
Abinash
12-22-2020 05:37 AM
12-22-2020 06:55 AM
Hi Albert. Here is the vi
12-22-2020 07:30 AM
Hi
I modified the real part into a query vi. In which the single write chars is in the subvi and has the possibility to have another end char and/or another number of data to read.
I left out the 50 ms wait, probably not needed, but you can easily add it yourself.
Now there is only one for loop and modularity is improved.
good luck and publish this for other mk 2000 users.
12-22-2020 10:04 PM
thank you Albert. Unfortunately they are not openning in LabView 18. I will upgrade and run them, also publish for others.