03-10-2020 05:23 AM
Hello,
So I had an error yesterday in my get command. Instead of using '47', I was using the hexadecimal value of '47'. Now that I have corrected that bit, the controller is returning the value zero.
The command you told me to send is not correct. The LRC check when calculated won't come to 'B3' but 'B2'. Even the vi you created returns it as such. I still sent that command in nevertheless and still got a zero.
03-10-2020 05:57 AM
The controller is giving back exactly the same message am writing to it. Chances are, this is a wiring problem. Hopefully solving that will solve the issue.
03-10-2020 06:27 AM
The wiring of the 16C series is that the transmitting and the receiving are done from the same pins. Hence the mode of wiring needed to be set as 2-wire instead of 4-wire. This solved the issue and am now able to set and get the temperature from the controller.
03-10-2020 01:05 PM
@aeastet wrote:
OK here is a vi that will calculate the command to the device. I would try to read 2 words and three words. This might be what the problem is. You are only reading two words at the moment. I would try to read three and see what we see.
I realize there is an easier way to do this I just wanted you to see what I did to get to this value. It matches the document that you attached as reference.
I know that this had been accepted as solved, BUT...here is an easier way to do it.
By building an array of the parameters you can make this VI scalable. You could save it as subVI and put it in your reuse library to create a Command Message for any number of input parameters.
I also cleaned up the LRC CHK. You don't need to convert "result" to a boolean array and back again, and the For Loop is not necessary.
03-10-2020 01:08 PM
Did you even look at the other VI I added to this discussion? It adds a lot more functionality than what you have here. and it also does the LRC check. It also builds in all of the commands that this device can understand.
03-10-2020 01:26 PM - edited 03-10-2020 01:31 PM
You do realize you have a bug in your "other" VI. It does not generate the correct Command. I'll leave it up to you to find it.
03-10-2020 01:31 PM
Yes that is why I made the second one.