LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication problem

Hello!

 

I am trying to communicate by a serial interface with an instrument that measures the gas NO.

In the attachment please find the manual of the instrument and the bytes that have to be send/received to/by the instrument. It is based on the NI example “Basic serial read and write”.

 

There are 2 command types that can be sent to the instrument:

NORMAL (0x00, 2. byte)

LENGHTY (0x01, 2. byte)

The first request must always be NORMAL, the following commands depend on the answer the instrument provides. There are 3 types of answers from the instrument:

 

BUSY (0x05, 2. byte), the instrument wasn’t able to maintain the inter-message time of 50ms. No data is returned, the communication mode of the answer is set to BUSY

ACK (0x06, 2. byte), everything fine, measured data is returned

NAK (0x15, 2. byte), error

 

If the answer is BUSY, the following command must be LENGHTY.

If the answer is ACK, the following command must be NORMAL.

If the answer is NAK, the following command must be NORMAL.

 

For this, please look at the command handler I also attached.

 

Between each command send to the instrument, the user must wait 100ms (time between the last received bit and the first bit send).

 

The problem is now that the instrument does not answer, although I think the order of bytes I send to the instrument should be fine.

Is there perhaps any problem of time, or a does my model suffer any other problem I am not aware of at the moment?

 

The attached files are my model and the manuel of the instrument.

 

It would be great if anybody could help me.

 

Thank you very much for that in advance.

0 Kudos
Message 1 of 4
(2,599 Views)
Since this seems to be a continuation of the problems you were having a couple months ago, you probably should have added to the thread there.
 
0 Kudos
Message 2 of 4
(2,574 Views)
Hello,
I know it´s still the same problem, but had plenty of other things to do since that time, but now I have to make work this modell quickly. The problem is it is still not working. So I put an oscilloscope at the rs 232 cable to see if labview is sending something at all- and it does and the bit flow is the one I expected, it is correct! So I think the device recieves the correct information, but does not reply or lapview does no read the reply the devise is sending. Could there be any problem with VISA read or the timeout I set?
I actually spent lots of hours the check why its not working,  would be great if you could give me a useful hint.
thank u very much for that
0 Kudos
Message 3 of 4
(2,549 Views)
To determine, whether the instrument is sending something back, you could use the oscilloscope on the Rx- wire too. This would make clear, whether the instrument "understands" your string.
greets, Dave
Greets, Dave
0 Kudos
Message 4 of 4
(2,539 Views)