Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232 receive same message sent

Solved!
Go to solution

Hi anyone knows what does it mean, when using an isolated USB2RS232 port, receiving exactly the same message that I sent?

I'm interrogating a custom frequency converter, with its own protocol, and the device responds with the same message I sent.

Basic serial settings, read bytes at port and so on.

The company who build it is sending me their rs232 port converter, so to make sure why they are successful and me not.

Thanks

0 Kudos
Message 1 of 11
(4,645 Views)

If the instrument is not simply set to echo everything, then perhaps you are sending the incorrect command, sending the command incorrectly formatted, or the incorrect termination character.

 

You have not provided the protocol or details on what you are sending or how, what language, what functions, etc.

0 Kudos
Message 2 of 11
(4,633 Views)

Hi it is a proprietary protocol. I was asking for the DC Bus voltage. The frame is made up of:

first 3 bytes 313131 in hex

1 byte for length (info+param)

1 byte for query information

1 byte for the parameter I am asking

1 byte for checksum (sum length+info+param and truncate at 8 bit)

I sent 313131 02 61 05 68 where 02 is the length, 6 means analog values, 1 means query, 05 means DC bus, 68 checksum.

The answer had to be  313131 04 62 05 0CF8 6F. I'm receiving what I sent and even I send "Homer Simpson", I get "Homer Simpson".

The doubt is the termination char which no one gave me instructions.

0 Kudos
Message 3 of 11
(4,616 Views)

And how exactly are you sending the hex characters? You still haven't provided the language you are using. If it's LabVIEW, you need to set a string control/constant to hex display, convert a U8 array with Byte Array to String, the Typecast or Flatten to String function.

0 Kudos
Message 4 of 11
(4,596 Views)

Sure, I'm using LabVIEW. The string control is set to HEX display. I'm able to talk to modbus devices pretty easy in this way. The problem seems to be the serial interface of the frequency converter which works with 0-5V levels. I will be waiting for the converter and then write here again.

0 Kudos
Message 5 of 11
(4,576 Views)
Solution
Accepted by topic author flori2

It was the serial interface the problem. The one I got from the inverter supplier is a custom made RS232 device, working on 0-5V levels.

0 Kudos
Message 6 of 11
(4,526 Views)

Hi everyone!

I have a problem to send and recieve data from rs232 (my cable is USB to COM). How to distinguish between a byte we had already read and a new byte in a stream data byte ???

Thank you so much!

0 Kudos
Message 7 of 11
(4,139 Views)

Hi, there is a cycle while reading the bytes. Where si the problem?

0 Kudos
Message 8 of 11
(4,137 Views)

Hi flori!

My problem is that I can't distinguish between a byte I have already read and a new byte in a frame data from rs232. How can we do this ?

Thanks

 

0 Kudos
Message 9 of 11
(4,134 Views)

Normally, using a cycle you always read (if present) new bytes. How does your device respond to a request/command?

0 Kudos
Message 10 of 11
(4,131 Views)