RS232 De-multiplexing data using Visa Read

Hello
I'm trying to do a simple task, but being new to this I'm having problems.
I transmit data down a RS232 line at 9600 baud. I have two channel of data say x and y where A and B are one byte each.
I multiplex/alternate them down the line i.e ABABABABABAB.....etc
At the labview end I want to seperate the data back to seperate channels for plotting on a graph. i.e A with time and B with time.
There must be a way of toggling some array builder conected to the visa Read VI ie odd for A and even for B and then plotting them in two seperate wave charts.
Iv'e got a single channel working but A and B are mixed together. (see attachment).
Any ideas if it can be done.
Thanks Bill
Attachments:
RS232-single.gif ‏15 KB

RatHunter wrote:
> Hello
>  
> I'm trying to do a simple task, but being new to this I'm having problems.
>  
> I transmit data down a RS232 line at 9600 baud. I have two channel of data say x and y where A and B are one byte each.
> I multiplex/alternate them down the line i.e ABABABABABAB.....etc
>  
> At the labview end I want to seperate the data back to seperate channels for plotting on a graph. i.e A with time and B with time.
>  
> There must be a way of toggling some array builder conected to the visa Read VI ie odd for A and even for B and then plotting them in two seperate wave charts.
>  
> Iv'e got a single channel working but A and B are mixed together. (see attachment).
>  
> Any ideas if it can be done.
>  
> Thanks Bill
>
Hi Bill
I think you were 90% of the way there.
If all you want to do is see the two waveforms on diffierent plots you
can right click on your chart and select stacked plots. I think you
have to increase the size of your ledgend to show two plots.
If you want the data on two different charts, index your array to two
different charts. I'm assuming by your picture that you are reading 2
bytes at a time.
Using two graphs could be useful if your plots had different time
scales. But i think the stacked plots makes more sense.
Good Luck
Eric

Similar Messages

  • Adobe form-Able to post  data using Adobe Reader 9 but not with Adobe Proff

    Hello Guru's
    I am facing one problem with adobe forms.
    We have develoed a adobe form using adobe reader 9.
    Now when user are posting the purchase requistion using the form,they are able to post the data using
    Adobe Reader 9 but not with Adobe Reader professional.
    Can anyone please advice me what can be the problem here.

    Adobe Reader 9 can't save the old FDA forms. FDA must update their forms.

  • How can use VISA Read and the Wait Function properly

    I am trying to read an instrument. The is a simple instrument because all it does is feed data; there aren't not any write commands whatsoever. I am trying to read the instrument in time intervals. It seems to work fine except for the one second interval. Every 5 seconds I don't get reading and there are zero bytes at the serial port. Any suggestions on what I should do?

    There is a Visa serial VI called VISA Bytes at Serial port. Use a comparison node for =0 and wire this to a case structure. In the false case, read your data.

  • SHOLD I USE ALL THE HANDSHKING SIGNALS WHEN USING VISA READ AND WRITE?

    I want to send string from com3 to com 4 using the example 'Basic 2 port serial write and read.vi'.How should I connect my com3 and com4 which are available on my pc.? Do I need to connect all the handshaking connections?

    In general, no.  There are some instruments that might require it, but between two COM ports on your computer you don't have to worry about it.  As said, just connect the TX of one port to the RX of the other and visa versa.  It also wouldn't hurt to connect the grounds.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can the carriage return within a variant be read as the terminatio​n condition for VISA READ?

    Hi guys, I am trying to read a variant data using VISA READ. The VISA READ is set to terminate reading when it sees a carriage return.
    Is there a chance that for the CR "encapsulated" within the variant be read by the VISA READ, and cause it to terminate?
    Cheers!
    Solved!
    Go to Solution.

    Since with the Flatten to String you are basically sending a binary representation of the data, you are going to have problems if you have the termination character enabled since byte 13 would be part of perfectly valid data and not just represent the end of a transmission.
    What you might want to do is disable the termination character.  Of course now you don't know how many bytes to read.  So prepend your message to write with the number of bytes that are a part of the message (string length).  You may want to use two bytes, (one byte would only give you messages up to 255 characters in length.)
    Now on your reading end, read 2 bytes, convert them to a number and feed that number in the next VISA read which will then read that many bytes.
    For examples, look at the TCP/IP read write examples in the example finder and you'll see how they send a message with 4 bytes to tell how much data makes up the rest of the message.

  • Visa Read Overrun Problem

    Dear all,
    I am using VISA Read Function to read data coming from my Hardware.
    The data is coming really fast. The H/W is sending 1600 bytes after every 10ms.
    I am using Event Structure(timeout event) to check whether 1600 bytes are at port or not. Timeout is set to 1ms. i even tried with 0ms.
    Baud Rate = 3000000.
    but the program is giving Buffer Overrun problem when i am trying to read data using VISA Read.
    I have set the buffer size to 64000 but with no success. The problem still seems to persist.
    i have played around with Receive buffer of COM Port in device manager. i tried all the values from 64 to 1600, again with no success.
    every time i run the program i get an error stating,"A character was not read from the H/W before the next char arrived" at VISA Read Function.
    and i am not doing anyother processing other than Reading data from the Port in the timeout event. 
    What could be the problem?
     Thanks,
    Ritesh 

    Ritesh,
    The over-run is still caused by the driver of the hardware.  What you are observing is that the driver is able to keep up with bursts of data coming into the port.  So for the first few thousand bytes coming in, there is no error.  However, after a while, the driver falls behind and cannot keep up (hence the over-run error).
    How does FTDI recommend that you use their ports in LV?  VISA may interact with the driver in a different way or set properties to different values.  All of this can have an impact on how the driver performs.  Also, this DLL that they provided may not return overrun errors the same way that VISA does.  The malformed string may just be missing data that was missed because of an over-run error.
    You have not mentioned anything about the types of flow control that are available to you.  The only real way to prevent over-run errors in data intensive communication is to have ways to hold-off the data (flow control).  Since the data will be interrupted for a fraction of a second, the driver will have a chance to get the data out of the hardware in time.  Communication will automatically resume once the data is read out of the hardware.
    Thanks,
    Steven T.

  • Help with RS232 Communication without using VISA

    I'm a newcomer to LabVIEW, and am currently trying to interface with an instrument that communicates via an RS232 serial port.  This instrument is not compatible with the VISA tool, and since that (and the DAQ Assistant) is all I've used to interface with instruments, I'm at a loss as to where to head next.  I know the baud rate, data format, stop bit and parity bit, and am able to generate the ASCII commands that I want to send to the instrument; I just need a bit of help on knowing which function I can use to go the rest of the way.  Thanks for any help.

    Why is the "instrument is not compatible with the VISA tool"?
    VISA is a device driver interface that allows LabVIEW and other NI programs to communicate with the serial port on the PC.  It doesn't care about what instrument is on the other end of that serial connection.  Likewise, the instrument on the other end should have no idea whether it is being communicated to it by way of VISA, or any other device driver.
    If you are having problems, then it is probably in the way you are using VISA and not within VISA itself.  There may be some other ways that you could have your LabVIEW program access your PC's serial ports without VISA, but you are going to have more headaches and problems that way.
    Please provide more details on the problems you are having with using VISA.

  • Play sound in specified duration and desired file when reading data with VISA functions ?

    Hi.
    I read data with VISA read function and then I use functions like multiple for showing data on Chart. every thing is OK.
    now I want play a specified sound (like a 3s song in my desired folder) when signal amplitude cross over from specified value. then after desired time, it will be wait for new cross over from specified value and this procedure repeat again until I stop the program. 
    Data comes from MCU and it doesn't stop when system play sound and when system play sound, incoming data for this part (play sound) will be ignore them until specified expired.
    I use this VI for reading data and mentioned part which is sound part is empty and I don't know what I must done ?
    altougth I use another while loop for sound apart because I want save CPU time.
    Thanks.
    Solved!
    Go to Solution.

    I would recommend making the data type of the notifier a cluster that contains a path and a numeric (double).  The path tells the player which file to play.  The numeric is the duration.
    Now for a slightly complicated, but really neat, way to stop your second loop.  Do not use a second notifier.  Instead, send the normal notification but use Not A Path for the path in the cluster.  Your second loop can do a check for the Not A Path and stop when that is recieved.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can i know the data that labview takes when calls visa read?????????????

    First sorry for my english!
    I have a program in wich i read data trough USB(in bulk mode) from a FIFO(from a microprocesor) . I don´t know if when i do a visa read and the program that is running in my microprocessor is waiting for the FIFO full, what data catch the visa read?, because labview don´t wait, always take data when visa read is call!!
    THANKS THANKS......

    A read operation just retrieves the bytes that are available on the serial port. Means that these bytes are there because they have already been sent by the connected device. They may be remains from a previous communication.
    Your protocol should ensure that
    1/ the serial buffer is empty before your start your communication session.
    2/ you read either a specified number of bytes, or all the incoming bytes, using a timeout in case of failure
    3/ you leave things clean after communication (empty buffer, close port...).
    Try to be e more specific if you need further help.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to use multiple visa read in one program

    hi
    i am working at Hameg HM8143 power supply i want to measure voltage and current simultaneiously and use the measured values for further calculations. for this i used two visa read blocks.
    >>>>>>the measured values are shown in the same visa read string however i want it to be shown sepetately,
    >>>>>>One of the VISA read block gives error. so i want to know how to use VISA read to get current and voltage simultaneously in seperate strings
    >>>>>>than how to convert strings to numbers  for using them for my calcultions.
    i am attaching screen shot as well
    Attachments:
    screenshot.JPG ‏164 KB

    you can not use a single serial to send 2 commands simultaniously?
    There is a single serial line so one command has to be before another.  This doesnt mena that you can not read from 2 seperate threads but will have to ensure that there is a locking mechanism to make sure that your queries are atomic.  In labview encapsulating all communications can be done with an action engine which will allow for concurrent execution with automatic blocking of your resource (serial device).
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Adobe Reader importing XML data using command line reference

    Financial Gonverment in Poland prepared new VAT declarations, which are protected from changing.
    Restrictions summary is as follows: Printing, Commenting, Filling of form fields: Allowed; other restrictions are not allowed.
    I am able to export xml data, using Acrobat Reader, change it to have desired data and than import it and everything works fine. In ERP program I need to fill this document with data from the system. Normally we were doing this using FDF printing channel, but for this document it shows an error with bad user password. We were talking with people from government and only answer was that it is not possible to change document restrictions... We find out the way to create xml document, but we want it now to open from the command line (UNIX commands). But we only find the way to open pdf file with specified fdf file... But when I'm trying to open PDF document with specified fdf URL (url is linked to xml file... i don't know if it is proper... if not than how to create fdf file with desired xml?)
    Is there any possible to open a pdf with specified xml url to load to that PDF?

    I found the mistakes I made and I corrected them. The newly revised/corrected code is:
    USE OPENXMLtesting1
    GO
    With XmlFile (Contents) AS (
    SELECT CONVERT (XML, BulkColumn)
    FROM OPENROWSET (BULK 'C:\Temp\books.xml', SINGLE_BLOB) AS XmlData
    SELECT *
    FROM XmlFile
    GO
    It worked: Results
         Contents
    1  <catalog><book.id="bk101"><author>Gambardella.M...
    If I clicked on this, I got a listing of the whole book.xml!!  I don't know what it means.  Please comment and respond.
    Thanks,
    Scott Chang

  • Configure VISA Read to terminate on unique character sequence

    I am communicating with an instrument via a TCP connection using VISA read/write. The terminating character sequence from the instrument is "->" Is it possible to get VISA to terminate on this character sequence and basically not return these characters in a read?

    No, it can only be configured to terminate on a single character. If you know that '>' will not appear in your data you can use that as your termination character. Otherwise you need to create your own read VI that will look for a sequence of characters as the termination value.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Visa read object difference parity setting for PC and TPC2012 device

    Hello,
     we found some difference between application running in PC and runing in TPC2012 device.
    We tested modbus communication via RS485 (9600b/s, 8bits, parity even) between PLC(master) and TPC2012 (slave). We used Visa read object and set parity to Even via property node. From the PLC we sent request to device and in our application we only read the data from PLC and displayed it (8bytes) on sreen.
    If we tested the application on PC everything worked fine. But if we compiled application and ran it in TPC2012 device  the data was different (for example if I sent request from PLC to slave 05 03 00 01 00 01 crc crc on the TCP I saw 00 03 00 01 00 01 crc crc. The  crc on TPC wasn't equal to crc on PLC.
    We found that problem was in VISA read setiing for read data in TPC device. If we set parity to SPACE (instead of EVEN)  then we read data correctly.
    Modbus - Parity set for VISA read object:
    Master PLC (even) - PC (even) -> visa read - data are equal
    Master PLC (even) - TPC (even) -> visa read - data aren't equal
    Master PLC (even) - TPC (space)-> visa read - data are equal 
    PC: Win XP SP2, LabView 8.5 with LabView TP module 8.5.
    TPC2012: WinCE 5.0, NI visa 4.2, NI TPC Service 1.0.
    Best regards,
    Pavel Rucka.

    I just found out that the VI for the currentmeasurement with the keithley 6517a has the same error but still works fine. Now I also tried to adjust the serial data bit and parity settings via the VISA configure serial port function but still no improvements.

  • Display FFT of input signal which receive from VISA read ?

    Hi.
    I receive data from MCU whcih sampling frequency is constant and we assumed it is S. now I get data from MCU with using VISA read block. I can display data, perform some functios like filtering, multiply and save them in txt files. all thing is OK.
    but when I want to see FFT of incomig data on chart , it doesn't work !! I use this VI for calculate and display FFT of input signal (from VISA read) and display it which in Y-Axis is magnitude and X-Axis is frequency. 
    in your mind why this is not work and what I must done for show input signal FFT and frequency components ?
    Thanks.

    If I understood this correctly, you are getting the correct results when outputting to a text file but you are not able to see the results when trying to output to a chart?
    This discussion may be of some help to you.
    Rob S
    Applications Engineer
    National Instruments

  • Why do I get a "termination character was read" warning with VISA read and TCPIP?

    I am using VISA Reads with TCPIP raw sockets without issue with NI-VISA 3.0.1 but when I moved to NI-VISA 4.4 I was getting timeout errors.   The timeout errors went away when I set the termination character enable property to true (which seemed to be default in NI-VISA 3.0.1), but now I get a warning stating that the "termination character was read".   
    Can I disable this warning?   Can I set the termination character enable to default?   How can I get rid of this annoying warning?
    Solved!
    Go to Solution.

    Hey Dagwood,
    Unfortunately there isn't a way to globally change the attribute VI_ATTR_TERMCHAR_EN to VI_TRUE.  I spoke with R&D about possible use of the registries and they say it's not accessible through that.  To address why this change was made, the developer who made the switch isn't around anymore so I can't find his reasoning as an explanation for you.  The best this for you to do in your code would be while initializing, use the VISA Property Node to make the change and until that VISA Resource is closed, this change will remain set to the value you assign.  I'm sorry we cannot provide any other solution for this inconvenience.  Also, if you feel this is a large burden on your programming practice you can definitely submit a product suggestion for the ability to change global default values for VISA attributes.
    Thanks,
    David Pratt
    AES - Test Side Products
    NIC

Maybe you are looking for

  • How to create a search form? - Jdev TP4 11.1.1.0.0

    Hi, I am using Jdev TP4 11.1.1.0.0. I have a af:table which is based on a view. I want to have a search form on top of this af:table to query based on the selection in the search form. I have 15 columns in the view. When I drag and drop the "All quer

  • Best practice to export TV Guide to TXT / CSV files

    Dear All, I have working TV Guide exporting to XML using Oracle 10g. Now I have a request to allow to export it to a TXT file delemeted by commas or tabs. Thought using of External Tables will do the work, same as I import the data, but seems that I

  • Imac Overheating

    I have a major overheating problem in my 24" imac. When the problem began I suspected the hard disk, but I have ruled it out. The behavior of my machine had become sluggish and sporadic over the last month. This week it became nearly useless. It woul

  • How to transfer files to and from iPad air using bluetooth

    How can I transfer file to and from my iPad using Bluetooth to another Bluetooth-enabled device?  Is there an app for this? 

  • Can't find libjava.so on solaris 8

    when running the .bin, it runs for about 30 seconds, installs file into the tmp directory then says error: can't find libjava.so and deletes the installed files I am attempting to install it onto a virgin Solaris 8 (Intel) server and have added the p