serial data-GU256x64D-3900

varun  Mar 19, 2020

hi noritake

i am using the module GU256x64D-3900 VFD module with firmware version-F333B2416. I am sending the serial data using RS-485 through matlab. Whatever the data  am sending through matlab am receving in display. The following below is my matlab code

s=serial('COM1','Baudrate',38400)

set(s,'stopbits',1)

set(s,'databits',8)

fopen(s)

fprintf(s,'OIL TEMPERATURE')

fprintf(s,'\n')

fprintf(s,'OIL PRESSURE')

Expexted output:

OIL TEMPERATURE

OIL pressure

Actual output what am getting:

OIL TEMPERATURE\nOIL PRESSURE


Noritake VFD  Mar 19, 2020

Varun,

It looks like your code is sending '\n' instead of a carriage return line feed (CRLF).

Have your tried configuring your serial terminator as a carriage return line feed?

For example: s=serial('COM1','BAUDRATE',38400,'Terminator','CR/LF')

Best Regards,

Noritake VFD

varun  Mar 20, 2020

hi

Thanks for your replay

After your rpl i even tried with carriage return and Timeout. But still getting same thing as output. The following is the code 

s=serial('COM1','Baudrate',38400,'Timeout',10,'Terminator','LF')

set(s,'stopbits',1)

set(s,'databits',8)

fopen(s)

fprintf(s,'OIL TEMPERATURE')

fprintf(s,'\n')

fprintf(s,'OIL PRESSURE')

One more thing after executing the code am getting the output in display but the display is getting cleared shortly afterwards


Noritake VFD  Mar 20, 2020

Varun,

Maybe instead of using fprintf(s,'\n'), can you send hex values 0A and 0D to the display?

Also, can you try removing the timeout and see if your module is still getting cleared?

Thank you,

Noritake VFD