09-28-2017 07:37 AM
I want to pull-down my TxD line when it is idle, but since it is assigned in the clip generator for serial line, I cannot manually access it, without using VISA. Infact, if I use VISA, then TxD line is always pulled-up while the line is waiting for the next signal.
Is there any way to fix this uncontrollable behaviour of labview?
Best Regards
ONUR YILDIZ
09-28-2017 09:19 AM
I don't understand what you mean by the phrase "uncontrollable behavior of LabVIEW".
But I don't see any properties for VISA that allow you to change the level of a transmit line for a serial port. There are ways to set the control lines such as Data Terminal Ready, or Ready to Send. Nothing that changes the transmit line.
09-28-2017 10:03 AM
Hi RavensFan,
"uncontrollable behavior of LabVIEW VISA function" might be the correct phrase. But in reality, I do not actually know whether or not I might control this function behaviour.
Unfortunately I could not change the hardware design of the DCE device, and unfortunately the DCE device inverts the levels of the serial signal at its input. So, whether or not I invert the meaningful signal, I cannot pull-down the TxD or the other lines, especially while they are idle. Hence, whether or not I use DTR, DCD, CTS, RST, RI, etc. (since everthing is inverse) I miss the TxD signal. So, I have to control manually these lines. But the problem is that I do not exactly know when VISA function will send the TxD signal.. I use VISA Write function, which is just a black box.
I am trying to find a way to manipulate this behaviour within LabView environment. However, the only way I can see is seems like to write this communication at low level. Any suggestion is welcome.
Best Regards
ONUR YILDIZ
09-28-2017 10:54 AM
I wonder if you can emulate a serial port using digital i/o? And is it even worth going down that path?
09-28-2017 10:58 AM - edited 09-28-2017 11:08 AM
Usually 'inverted' rs232 lines are a TTL(or 3V logic) level and need a rs232 port driver, that shift the levels to a standard conforming level and do the inversion 🙂 ...
If your device supports rs232.. fine, you can expect that LabVIEW and the VISA driver will allow you to communicate. ...
There are cheats/hacks to save some parts .. sometimes aditional resistors are needed, handshake lines are (ab)used for power supply, etc... if you are lucky the documentation of your device give a hint.
BTW to play around with the Tx line you can use the Break state property .... but that doesn't help you for inverted signals.
09-28-2017 11:14 AM
@billko wrote:
I wonder if you can emulate a serial port using digital i/o? And is it even worth going down that path?
If the protocol is rs232 I would turn on the scope and heat the solder iron 🙂
09-29-2017 01:50 AM
Hi Henrik,
In the hardware there are also line driver and level shifter, and the output signal of microcontroller is fully inverted (including idle level) and shifted to the required levels (There is some bug with hardware design, and I have to send the correct signal since this mistake is tolerable with software. The only requirement is to control this idle level from software.)
So, I have tried Break State property, but it did not work for me (namely for idle state). However since you point the same thing I will try it again, maybe I might have done something wrong.
Best Regards
ONUR YILDIZ