Visa series read write

Hello..

I have no problem with reading series. I want to playback multiple visa series... Fist read I want to read the data of 5x8bit uC then if visa data read isnot "NOT" I'm going to send data to the CPU as the character ' end then read data from uC to new but is leght data 2x8bit data...

Please, help me...

This is the number of bytes you want to read. You already said you first want to read 5 bytes. If you use VISA set up the Serial Port and the stop character allow to true, you can set a number of high bytes and playback will end when the stop character is detected. The character of default endpoint is a line break. If you set it to false, you can use the bytes VISA to the Serial Port to determine the number of bytes in the buffer is and read this number. This makes the basic example.

Did you do any debugging serial communication base? I suggest that you use a program like Hyperterminal/Procomm/Putty/.etc before trying to write your own program. It is also difficult to give detailed advice without knowing how you have set the serial communication of the microphone.

Tags: NI Hardware

Similar Questions

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

  • VISA from read/write to serial port - unable to implements several orders of writing!

    Hello

    I'm new to Labview and I'm reading from a pressure through a virtual serial port USB sensor. I am able to read the port when you use HyperTerminal

    The code sequence that I should write to the port in order to obtain measurements using hyperterminal is the following:

    ' *' (2A hex)-online start and the responses of the port by asking 'Command', I should then enter

    FF-online measurement select the port must ask the 'mode', so I should enter

    0 has-online measurement of high resolution mode and it was then that I should start receiving action.

    The port is always answer by errors when I write the start command or the FF one. I tried to establish a sequence stacked to write the three commands then read the port, I added some delay between the three of them, but it does not work.

    Now I made really simple and removed the stacked sequence and just put the three commands one after the other and try to remedy not to not on the code.

    I'm really stuck at this point, could someone help me please? I read a lot fo articles on the forum, but I can't solve this problem

    Thank you

    I have attached my VI and the SCP1000 documentation (I can provide other versions of my demo if necessary)

    The reason for your problem is a frequent misunderstanding even among experienced programmers. Take a look at this thread

    http://forums.NI.com/NI/board/message?board.ID=170&thread.ID=417750

    In your data sheet, then they return codes like 0xFF or 0x0A so has a single byte of average value. Then you in your-active code constant writing FF\n is so this equal to values in format hexadecimal 46460A and your instrument do not understand. But it will include FF0A. In order to solve your problem, you would type in \FF\n in your '-' chain helped codes. Remember too, if you type in \32 it will be converted to character 2 this being 0 x 32 50 decimals and code ASCII 50 is equal 2

    Take the time and change the display format of string between '-' display and Hex display and you will see the difference

    Hope this helps

  • series read write

    Hello

    I try to use e/s series to connect with a sensor.  The sensor waits the Send command followed by a carriage return, then going on to its value.  I joined the program I use below.  I can get it works using the instrument i/o assistant, but I would do it how I have it below.  The error I get is-1073807339 (VISA: (Hex 0xBFFF0015) timeout expired before the operation ended.).  I have a feeling that this is probably due to the fact that he must wait for the data and never receives. I think the problem has something to do with it not recognize my send command or the carriage return.

    You do not want to send a return transport. You send the characters '-' and 'r '. Select '-' Codes by right-clicking on the constant.

  • Add event to VISA N read/write

    Hi all

    I enclose the snapshot of VI I'm working.

    When the number of bytes to Port > = 1054, he reads from the port.

    I will now carry out playback VISA in a housing structure.

    Now, I want to run this function of reading in a node of the event. as every time that the bytes to port > = 1054, it should initiate an event and read function must be called in this node event rather than in a housing structure.

    How is that possible?

    Thank you

    Ritesh

    Just use the event of timeout and put inside your existing code.

  • Get integer values of visa series read

    Hello

    I am having trouble getting the integer values correct of the reading series string that I get. For example if I send 0P3 I get 48,112,51 as elements of an array. I used the string to byte array function to convert the string I've read on the serial port. The values are the ascii equivalents. How can I get 0, p, 3 in the back? I need that the program does a length check and crc going wrong because 0 is now considered to be 48.

    concerning

    Bastien.


  • Issue of Visa series?

    Hello

    Currently I use VISA to interface with RS232.

    My question is that I see a difference in execution time of each image eight envoys

    by VISA.

    For example,.

    Serial bus status: baud rate: 9600 data bit: 8, Stop bit: 1

    I used the example "basic series read/write example.vi.

    So if I write '1' data, I see the performance of 16ms in my application

    with data up to "12345678", eight data I see him getting same 16ms.

    However, as soon as I increase given to 9 characters, "123456789."

    I see the time pass to 32ms about.

    So my question is who made series VISA application makes Group of eight chassis

    entry, write to read from HW or HW? This is why I see the execution time

    increase by nearly twice the 8 characters?

    Thank you in advance,

    Do

    No, I don't have a problem.

    There are a few minor differences, but not time to double

    that may be acceptable.

    Thank you.

  • Serial Port Visa to read 1 line IO

    I have a visa series opened and need to read the State of the PIN-6 on a connector Series 9 pins to see if this line is high or low. Is there a way to do so by the visa series read the command?

    PIN 5 is located on a 9 pin connector. If you want to detect the actual input lines as CTS, DSR, DCD or RI, use a VISA property node and select property > settings series > Modem line parameters

  • Possible timeout in VISA read/write in While loop

    As the title says, I have a while loop that is constantly written followed by reading using VISA read/write.  I'm waiting for buffer correspond to a certain one, which the true value would end the loop.  In this loop, I have an indicator showing how many times he runs. All of this is repeated in another while loop.

    My problem comes the counter arrives at 10, then stops at the "write" command.  Do not know why.  I tried to increase the time-out of the instruments, but nothing has changed.  I added a delay of 10ms in loop, which also has not changed anything.

    For reference, I use a tektronix scope series 3000 of the MDGS and checking its state of relaxation.

    You said chill to read earlier!

    But it is not supposed to have to write it either.  Experimentally, access all VISA nodes, right-click and choose the Mode of synchronous i/o.  Make it synchronous instead of asynchronous.  The watch symbol will disappear from the top right corner.  See if that changes anything.

    What kind of serial port are you using?  What is an integrated in the PC?  A USB to serial port adapter?  Makes the chips on that, Prolific and FTDI?  You can try with a different serial port or a brand of adapter?  A lot of people have had problems with prolific chips.  And I have also heard of people having problems using adapters who had fake chips in them.

  • Several problems of reads/writes of Visa

    Hi all.

    I've been using labview VISA to communicate with an I/O device called a µChameleon.

    I need to monitor the status of mutiple pins by sending an entry VISA to query the PIN then use a read VISA to identify the State of the PIN.

    The problem I have is when I use several reads/writes VISA. When I run the present, only one VISA reading returns the corresponding pin State, but everything else show nothing. The funniest is when I use run highlight, they will return all the State of the PIN.

    The photo below shows the basic principle of what im doing by simply copying the base serial number read and write code. For example, I send the string 'State of pin 1' followed by a carriage return and if it works correctly it should return a string Read VISA saying ' pin 1 1 "(top) or" pin 1 0 "(low)." ""

    Can someone help me witht that. Is this a timing problem with the VISA of the readings?


  • Synchronization with Serial read/write problems. can not get the functionality of the terminal emulator

    Hello

    I am writing a VI to control PWM with a microcontroller via a serial port. I wrote a simple code for the microcontroller that allows me to set the ratio of duty cycle on a scale of 0-65535. It works very well with Termite of Compuphase (RS-232 plug); The microcontroller invited me to an entry, expected that I would one, updates and expected another entry when I decided to send him. Now, I'm trying to get the same functionality on a LabVIEW vi but hit a snag.

    When I tried to send my orders with a series read base and an example of writing, everything worked fine. I could see the prompt entry, write an entry and if I was quick enough, check out the update message. Even when I was not fast enough, I was able to check the update by monitoring the PWM pin with a Logic Analyzer. The problem with the basic example, however, is that I need to update the report to aura cyclical ratio, so I went for an example of reading continues writing. The problem I've met; is that I have to switch between reading and writing to make it work. When I do that, either I don't hold write it down long enough and nothing happens, or I get several updates when I switch to reading. Some of these updates don't even match and produce updates to defective upgrades for example; 16000 16000, 16000, 16000, 6000, 600, 60, 16000, 1600, 60, 0, 0, 0, 16000, 60, 0, 0 etc.

    I tried which allows characters of endpoint in the hope that the writing would end at the end and go to reading where he would receive a termination character and wait for me allow writing once again, but nothing helped. I still have to alternate between the two and either get no response on reading several updates of variable accuracy. I tried to remove her allows read/write and their structures of matter in the hope that the loop flow, associated with the characters of endpoint would the case, but then the updates don't register at all. The funny thing is I did a VI like this before with an Arduino and that there not even no need to switch between writing and reading (I'm now using a Board of Freescale FRDM).

    I was also the frequency of timeout errors; Error-1073807339 at VISA Read, reason Possible: VISA Hex 0xBFFF0015. I removed the option to stop the while loop if there is an error so I can run but always pops up an error on the judgment occasionally. Could the problem of synchronization always cause me problems?

    Would appreciate all advice really, I am providing my slightly modified example screws and can provide the code for microcontroller on request, even if it's very simple.

    Thanks in advance, it is
    Yusif Nurizade

    In other words, frankly, a good bad example you according to your code. Also, you have the order of writing and read upside down in your amendment if the instrument requires a command to return something. It should really be using a structure of the event. The structure of the event around a write and read and use a value change event. I have attached a quick change. This mod is still a reading after writing. If necessary, you may have two separate events to write and read.

  • VISA series Loopback speed and precision with double loops and a queue

    I'm working on a test of communication between 2 PCs. I test communication series RS-422 ports by using a simple loop. PC2 wrote continuous data at 38400 baud to PC1 (LabVIEW test code is here). PC1 reads the data and writes the data to the same port as soon as possible. PC2, reads the data and compares to what should be returned. I can get the highest speed is a speed of about 37300. Because it is continuous, finally that I get an error because the buffer overruns (read and write buffers are 65KO).

    It seems that VISA writing takes a lot longer than the VISA read. I do read/write asynchronous operations. I've read a fixed amount of data (1024 bytes) and then queued data to write in another loop. My timeout is set to 0.5 seconds, which is much time opf at 38400 baud (4800 bytes/second). I played a bit with these numbers, and they are the best I can get. If I increase the data read to 2 KB, the queue members increase. If I'm going too low, I start getting the data in the input buffer overrun.

    Anyone had experience with this type of test? The code is attached. Please take a look and see if I'm doing things correctly.

    Michael

    I do not know if this explains a gap between what you expect and what you found in 0.8 seconds, but you have added another level of complication in using the digiboard.  You don't have a real serial port, but a simulated serial port which is hung at the end of a USB bus.  The digiboard software creates a virtual experiences, and so its driver software and firmware on the side of the Board of Directors of the USB bus must manage some translations to go a number of compote, transfer on the bus and decode the Compote number so that it knows which 8 physical ports that it must send the message to.  You can see delays in translation at each end so something in the USB itself Protocol where it needs group information.

    If you have another, a different brand of the serial ports, you can use, you might want to try one of these to see if you get similar or different results.  But I don't think it's a good idea to try to test the limits of a serial communication device using hardware that adds the other layers of the communication protocol and therefore complicated results.

  • Big against little endian - how will this affect my Performance of read/write PDM

    Hello

    I read that LABVIEW intrinsically stores data in big endian format, but the read/write of the VIs DDHN have the little-endian as a default. Simply, you wonder what is recommended for these screws TDMS and if these options affect writing / reading performance somehow?

    Hello

    The endian of data does not affect the performance of the read/write of the DDHN screw the primacy of the format is just down to personal preference when working low level with data.

    If you do not read or write the bits in a personalized way, then I would recommend leaving the endian as it is by default when reading or writing. Otherwise, use any kind you like or prefer to go through.

  • VISA series operation does not work when the PC software performs

    Hello everyone.

    I'm using LabVIEW to communicate with a control via VISA series. I can communicate with this box in most areas very well, as surveillance data function I use without any problem. The only thing I have a problem with the unit is calibrated. Calibration is achieved by opening a binary file and transfer the data of 16 bytes at a time during the series with the help of a 16-byte write the command that has this structure: [command, in this case 'P'] [2 bytes from 3800 HEX address] [16 bytes of data] [checksum 1 byte]. I'm correctly calculate the checksum, and the documentation says that the box must respond to all orders less than 100 milliseconds.

    When I try to do, the zone responds with one E several times (E is supposed to say checksum error, even if I am calculating correctly), then no longer responds to nothing. The strange thing is that this box comes with a software that allows to calibrate it and that the software has no problem with him!

    I tried using SuperMon to capture what the software sends on the series and compare it to what I pass, and from what I see, it sends the same data that I do, only he works and mine is not. I also tried using SuperMon to manually send the writing 16 bytes of a calibration function at a time, and he seems to have the same problem.

    It seems that their software works, I do something wrong. Here is a screenshot of my code that I am using. Any help would be greatly appreciated!

    I contacted officials of the control box and have solved the problem. Control box delay needs 5 to 10 milliseconds between each byte, not all orders than I had initially thought. Thanks for all the useful answers, and especially the number of split tip, which really cleans my code!

  • Do not read CD but DVD read & write

    Hello

    In my ACER laptop, now I am facing problem CD format is not read but DVD can read & write also.
    Could be he you pls tell me what may be the problem?

    Hi ABN1706,

    Please see the link below for an article about the if your CD-ROM drive is not recognized, with a few possible corrections:

    http://support.Microsoft.com/kb/314060

    I hope this helps!

    Debra
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

Maybe you are looking for