Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sine wave on serial port

Thank you all for your help

I made the vi in one loop but it didn’t work, but it worked in two loops when I put the VISA close outside the loops. I think it didn’t work from the beginning because the Visa write closed before it can be read.

 

I attached the one loop vi

0 Kudos
Message 11 of 16
(2,090 Views)
Hey Ziad,

It's great to hear that you got your problem solved.  If you want it to work correctly in one loop you still need to wire the error clusters properly (VISA write to VISA read) to ensure that the VISA write is done before the read is started. 
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 12 of 16
(2,075 Views)

I tried to change the data bit value to 6 in both visa write and read but I received the signal out of shape ,when I tried to put 6 data bit in the visa write add 8 in the read I received the right signal please if any one can explain why?.


            I want to use the receive loop to receive a signal from an 12 bit ADC, but the serial port only receives 8 bit max so if I divided the 12 bits into two 6 bits and send them how can I rejoin them after the visa read.
0 Kudos
Message 13 of 16
(1,929 Views)
Hello,
This will depend on how you are implementing this.
If you are going to work with the raw bits you can simply multiply the upper 6 bits by 64 (2^6)
and then do binary addition.
Christian A
National Instruments
Applications Engineer
0 Kudos
Message 14 of 16
(1,888 Views)
Dear chris

    let's say i'm sending the 12 bit are 111111000000 i will send them in 16 bit like this 0000111111000000 using two bytes when i receive them in labview they will be shown as a string.
    my quetion is will "type cast" with a 16bit integer array as type rejoin the bits.
thank you
0 Kudos
Message 15 of 16
(1,871 Views)
If you are sending as string values, you can just concatenate and then convert using a Decimal String to Number VI
Christian A
National Instruments
Applications Engineer
0 Kudos
Message 16 of 16
(1,850 Views)