Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I change the termination character on VISA configure?

Background: newbee, Win 2000 > Laview 8.6 > USB to RS232 converter > RS232 to RS485 converter > Superlogics Analong Input module 8019R

Tested known working:

 - USB to 232  on COM7

 - 232 to RS485 tested on another application 

 - tested communications with Superlogics Utility works fine, transmits and receives commands from the I/O module

 - programmed basic serial control as per example: transmits OK [after I learned to append the /r termination], device responds [via LED diagnostics] but LabView does not see any characters.

The termination for the I/O module response is [CR] not [LF] as the default in the VISA configuration module. I have tried every which way to change the termination character from \n to \r but I cant find the way. Any suggestions?

 

Other suggestions are welcome, for example, where can I find an updated driver? Superlogics web-site only have version 4 drivers.

 

Stuck can't really go on with my application (wind power measurement) until I get over this hurdle.

 

0 Kudos
Message 1 of 6
(4,150 Views)

The VISA Configure Serial Port sets the termination character for a read. In order to set a termination character for a write, you use the Serial Settings:End Mode for Writes property. Look at the Advanced Serial Write and Read example. It sets write termination character there.

 

If you have an old driver, post it here or on the LabVIEW board and ask for help in converting it. Anyone with a LabVIEW version prior to 8.5 can open it and save it in a newer version.

Message 2 of 6
(4,147 Views)

Thanks Dennis,

I see what the advanced Serial Read/Write vi is doing. I Tried this:

changed [using front panel VI, double clicking] termination character from "A" [LF] to "D"  [CR]  as required by my instrument. Now it does not work at all so I assume that the \r was not appended to the write string by "property node".

 Is there no way to just force a set-up in the block diagram without a front panel input?

0 Kudos
Message 3 of 6
(4,142 Views)
Of course you don't need a front panel control. You can use a block diagram constant. I don't see where that will change anything though. Are you sure you have all of the com port settings the same as when you used the basic serial example?
0 Kudos
Message 4 of 6
(4,132 Views)

Thanks again, Dennis. I am new to Labview but not serial communications. I wanted to learn LabView during my vacation and just brought one I/O module for practice. As Murphy predicted I would get stumped on the first steps.

I have checked and re-checkd the settings, they are OK. I now belive that the I/O module responds faster than my RS232 to RS485 2-line converter releases the bus. I have it set to assert low impedance on the leading edge of the first data bit but I can change to use the DTR line if my USB to RS232 converter supports hardware handshaking. Somewhere in the LV examples I saw how to read and assert the hardware handshaking line on a com port. With loopback jumpers can test the DTR line. In the real application we will use a hardwired COM port, not a USB converter.

Just one more detail: The  Configure Serial Port VISA right click "termination character" only offers numeric block constants,[blue outline box] which will not accept \r as a value to be entered for read termination character.  What am I doing wrong? Is there a HEX constant available?

0 Kudos
Message 5 of 6
(4,115 Views)
The numeric value for \r is 13 in decimal
greetings from the Netherlands
0 Kudos
Message 6 of 6
(4,102 Views)