Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending pulses through the serial port

Highlighted

Hello everybody. I need to send pulses with frequency of 1 Hz, with time at a high level 5us (microseconds) for about 30 minutes at pin 3 of the serial port (Tx). Already built the circuit RS232 to TTL conversion. And the program I have done the basic routine of sending signal through the serial port and already noticed its perfect functioning. My problem is I can not send a 0 to the output. In the writing pad VISASERIAL WRITE the value I place is represented in ASCII and can not send a zero logic level at the output. Already consulted the table and the NUL code that represents bits 0 not out. I tried to use the VI BREAK but it does not satisfy my project because it keeps the low level by only 500ms and a certain delay occurs.

In short, HOW TO SEND A BIT ZERO BY EXIT VISA SERIAL WRITE IN ASCII?? Wish my output becomes zero for a few seconds.
Thank you guys. Attached follows my program.

0 Kudos
Message 1 of 7
(3,374 Views)
Highlighted
Does it have to be the tx pin? You have control of the hardware handshake pins with a VISA property node. You can assert/deassert.
0 Kudos
Message 2 of 7
(3,352 Views)
Highlighted

Hello friend. Need not necessarily be the Tx pin. I just need to control the frequency and pulse width at high level around 5us.
How can I implement the VISA property node?
Thanks

0 Kudos
Message 3 of 7
(3,344 Views)
Highlighted
I'm assuming you are setting the pulse width with the external circuitry.
0 Kudos
Message 4 of 7
(3,340 Views)
Highlighted

I think the pulse width is set by the baud rate.

I also used that approach in the past.

 

Serial ports can be a good alternative to pulse generators.

Their stability and accuracy may be enough for some applications.

 

ASCII 0 is the null byte and it cannot be typed directly.

But I am sure there is an escape character or something.

I am not very fluent in LV so cannot help you directly.

 

Good luck

S. Eren BALCI
IMESTEK
0 Kudos
Message 5 of 7
(3,330 Views)
Highlighted

If you also have LabWindows installed on your computer, there is a sample RS-232 application.

Its workspace name is serial.cws

 

You can send hex represented bytes from that application.

If you are just trying to test the environment, you can use such tools.

S. Eren BALCI
IMESTEK
0 Kudos
Message 6 of 7
(3,329 Views)
Highlighted

About your ultimate goal, I think Dennis has a point.

 

Even if you send a 0x00 byte, you will always have start and stop bits.

Which means if you do not generate the 1Hz delay from your computer, you cannot have a 1 sec pause on the line and a 5 microsec pulse with the same baud rate settings.

 

Sotware timing is not so reliable. Are you OK with that?

S. Eren BALCI
IMESTEK
Message 7 of 7
(3,328 Views)