Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Modbus for temperature controller

Go to solution

Dear all,

I am new with Labview, hence, my apologies for any stupid questions. 

I have a temperature controoler Ascon KX03 that can communicate trhough a serial port with Modbus protocol (I attached the datasheet, in particular at pag. 9 there is an example of the commands to get some information). As first step I connected the controller using a SerialTec software that works fine, so I am able to establish a communication and get, as instance, the current temperature value. I attach the screenshot with the string that SerialTec is sending to receive the temperature value. I would like to read using Labview, but I am trying without success. I attach my simple IV that is not giving any results. Actually, I don't know how to send a string of command (byte and words) to the controller. Sorry if it is a stupid question: how can I send the string of command to the controller to receive and answer and record the answer, please?

Thank you for your help





Download All
0 Kudos
Message 1 of 9


Which Modbus software are you using?

In fact you can such string also just using VISA with serial line communications.


greetings from the Netherlands
0 Kudos
Message 2 of 9

Hi Albert,

thank you very much for your quick answer. I see you are expert on this topic... I am using a software called SerialTEC

that has a good user interface and, once I set the right boundrate, parity etc with the address of the controller (1) and the command for reading (200), it gives me the answer from the controller.

I don't know if I understood well your words: should I write a string of words and send to the controller to have an answer?


0 Kudos
Message 3 of 9


Indeed, you can use serial communication in VISA to send the same string as in serialtec, I found out you are using the linx (makerhub) software for your test.

Instead of that use VISA because that is in fact a layer to send bytes via all kind of communication protocols to a device. And one of them is serial, other are GPIB, TC/IP, USB etc.

The modbus you have is a serial one otherwise serialtec would not have worked.

It is important to setup VISA correctly (and install the driver if not already installed on your system).

One of the odd things compared to other serial libraries is that you have to ad a cr/lf if needed, but probably not in the modbus case.


hope to hear that it is working at least for the cmd you already know.

greetings from the Netherlands
0 Kudos
Message 4 of 9

Hi Albert,

thank you very much again for your answer and big help.

I am trying using cmd, by sending the string 01 03 02 00 00 01 85 B2 (that I read from the SerialTEC software) but, unfortunately, I don't get yet any answer (below the commands that I used..). I will keep trying...

If you have any other ideas, please let me know.

In case you have time I also found an example of communication with the controller and Labview (attached) that should work for this controller and Modbus but actually I don't understand how it works and, so, I cannot adapt it in my case. 

Thank you for your time..


0 Kudos
Message 5 of 9
Accepted by topic author dant14


A made an example and saw you are using LV14 so here it is.

In LabVIEW strings can be displayed in more formats.

I changed the display mode to hex, change this by clicking on the left token at the start of the string.

This is just displaying the characters send or received in a different style.

The content of the string is always the same.

Maybe I have swapped high and low bytes this way but I guess you can play with this.

greetings from the Netherlands
0 Kudos
Message 6 of 9

You are simply a genius! 

Thanks really a lot

0 Kudos
Message 7 of 9

Now, I can read and control the temperature. I am working on display setting and making easier the conversion hex-dec, but I can figure something out.

thanks a lot, again..

0 Kudos
Message 8 of 9


Conversion from hex to decimal is easy

As I said the string just displays the values.

If you convert the string to an array of U8 you have all the values of the characters.

So you can do all arithmetic with the array.


And LabVIEW has a lot array operations.

Attached a crazy vi that has some string to number manipulations


greetings from the Netherlands
0 Kudos
Message 9 of 9