Lack of bytes in the communication of VISA

Hello

I created two with labview programs that communicate with each other using virtual COM ports that are connected correctly.

The first program sends a packet that contains an integer n to the second program that would return n packages containing 9 bytes, there is a pause between each two consecutive packets.

When I set the baudrate to 500 or 700 for both programs and for n = 360, they are operating correctly and no byte is not respected.

The problem is when I change baud rate to 1000 and more, for both programs and n is always equal to 360, there are a few separate bytes failed (between 0 and 3 bytes in general).

So, what do you think is the source of the problem?

May not be the size of the buffer because it is set to 64399599 (no kidding, this is the maximum size). Besides, I used both programs to other purposes where one received the second 1000 * 9 bytes for n times (there is a period of pause between two consecutive of 9000 bytes is sent).

On the other hand, I checked what the second program sends looking out back County of the entry VISA and trying to send these packets to hyperTerminal. And there is no packet lost (even for a 9600 baud rate).

So I guess that the problem is in the reading part.

If someone could help me I would be very grateful.

I tried with semaphores, and it is not working properly, thanks crossrulz!

Tags: NI Hardware

Similar Questions

  • Visa reading reads all bytes to the port

    I have a camera that I communicate via the Serial Port. I have a standard communications protocol. For a particular command, I know that the exact number of bytes expected in return. I send my order. I see the correct number and exepcted to bytes in the port. I then read the number of bytes in the port. However, the VISA read returns only the first two bytes.

    I contacted success with this camera and this Protocol for more than 130 commands unique and different. There are only about 6 orders in which the read visa does not read all the bytes in the port. Anyone know why that would happen?  I expect to see 6 bytes. I see 6 bytes. I have visa read the command with 6 bytes. The visa read returns only the first 2 bytes. It's very very frustrating. I can do this exact process even with a different command. I expect 45 bytes of this command. I see 45 bytes with this command and I read 45 bytes with this command.

    I don't think that it is device connected as I can converse with success with the same camera on the same computer with the same cable of connector using non-LabView. It seems to be a problem strictly related to labview and VISA read the order. If someone could help that would be greatly apprecicated.

    Thank you.

    What is the exact byte stream that await you in return with this command?

    Instead of opening VISA, use the configuration Serial Port VI.  In this way, you can override the default values.  It looks that your instrument using all the defaults VISA of speed in baud rate, start and stop bits, etc.  However, in the VISA software, there is a failure to use a termination character, and this character is 10 (0x0A).  If you use the configure Serial Port, you can tell the pilot VISA do not use the stop character.

  • whille prob get bytes to the serial port for serial communication

    Hi all

    I have one using the series write vi to send the command to the instrument. the answer I get is read NICU playback vi. I use between read and write the serial port bytes accumulate bytes. BU what I observed is quite strange. When I run the vi with the debugger, I could c the bytes to port series is 201 and what I get in buffer is only 133.

    any1 can guess at what the problem would be b?...

    You don't show the function of VISA set up a Serial Port, but I guess you have the active stop character. Playback will end automatically when the character is detected and you should never allow when you try to read hex.

  • Visa read byte at the port

    My visa to read, I feed in the bytes in the property node port as input for the number of bytes to read (it's 4 bytes).  However, the output of the read visa give only 2 bytes.  It seems that a few bytes have been lost during the read operation?  Why is this?  It is an easy to see what is in the buffer of the serial port?  Thank you!

    Yik

    You likely the session VISA set to end readings when he sees a stop character and VISA reading is to see the stop character, and ending the reading, regardless of the number of bytes you told to read. If you want that it explicitly read that much then you must disable the option "Activate the stop character" in VISA set up a Serial Port.

  • How to set up in the community of the 4-byte ASN route map?

    Hi all

    I want to do AS-prefix for one of my ISPs. I have map route this ISP and when I try to configure 'set the 64704:xxxxxx community' under the route map configuration mode, I get an error (it's 6 figures in my number of ACEs).

    in the configuration guides always mentioned ASN "well known." I found 'set extcommunity rt' but I think, and it seems that is not what I want to achieve.

    so, how can I include 4-byte ASN in my 'community set?

    Thank you

    Hi Ruslan,

    Just to comment on the 4B ASN support - there are a few pitfalls. A the community attribute is a value of 4 b itself. So if you store your own ASN 4B in a community standard, there is no space left in it for the remaining part of the value of the community. As the set community command manipulates only standard communities, it is impossible to use 4B ASN with her. Extended communities could be the solution, because they are long 8B; However, the type of extended community to use is called AS specific BGP extended community and is defined in RFC 5668. Unfortunately, IOS does not seem to take this type of community - and even if it did, your ISP would not seek for it according to the output of BLACKBERRIES from the database. The particular kind of wider community, you tried to use is called road target, and it serves a different purpose.

    That being said, I must say that I clearly don't understand the use of communities as indicated by your neighbor. Note that there are two communities:

    remarks:         64700:ASN - do not announce to AS ASNremarks:         64709:ASN - announce to AS ASN
    They say - do not advertise or advertise, to the ASN such AS specified in the lower part of the community. But how could your ISP perform filtering for an independent arbitrary system there if it isn't directly peering with it? It seems to me that if the ASN here in this description may be made by a defined limited ASN ot want to peer with your ISP and not an ASN preceded. In addition, when you read carefully:
    remarks:         64701:ASN - prepend 1x to AS ASNremarks:         64702:ASN - prepend 2x to AS ASNremarks:         64704:ASN - prepend 4x to AS ASNremarks:         64706:ASN - prepend 6x to AS ASN
    It is said "prefix N times to AS ASN" - but to precede what? And what it means when they say "precede"? I would say that at this point, it would be better to call your ISP and to clarify the precise meaning and operation of these values of the community until we try to find a solution to your needs. It might be possible that these communities leads to a different prepending operation than what we think. Best regards, Peter
  • Serial communication error VISA with LUDL stage controller

    Hello

    I'm trying to control a micro-positionnement made by Ludl stage. The model is Ludl MAC2000. It seems that the RS232 comunnication is implemented because I can talk to the controller using HyperTerminal. However, when I want to do the same thing through Labview, I can't answer the controller at all. The vi is roughly the same as the visa basic read/write in the example. Looks like a very similar problem in this post:

    http://forums.NI.com/T5/instrument-control-GPIB-serial/visa-serial-communication-problem/m-p/567065#...

    But the trick of nature of endpoint does not help in my case: I tried to toggle the termination character setting in the property node and different combinations of '\r', '\n' as termination characters, but nothing has worked so far.

    Seems to me there is some difference between the interpretations of the same order to Hyper Terminal in Labview. But I just can't understand what it could be.

    Anyone with a similar experience could give me some comments/suggestions? Thank you very much!

    Another difference between hyperterminal and labview is the speed of sending characters.

    LabVIEW breaks out the whole string to the controller

    HyperTerminal is this character by character. So much slower and slow the controller can be affected by this.

    You could add a loop around the writing of visa (to make it easy convert the string into a byte array outside of the loop and convert it to a string inside and you have a shipment char by char in LabVIEW

  • Specification of starting byte of the string of bytes

    Hello dear community,

    I'm looking for a way to start reading a continuous string series increments specified in specific positions of the string. I'll explain:

    The idea is using an Arduino board to read analog values of the 16 photodiodes and send their data as ascii to my computer. Values of the analog pins are of the order of 10-bit, so there are 2 bytes information needed by the photodiode. Now, I need to assign the right 2 bytes in this continuous string corresponding photodiode. Then before the Council begins to read all diodes, I programmed to send 2 bytes (lets say "xx") as an indicator of starting leading to 2 bytes ("xx", indicator of start) + 16 * 2 bytes (= data of photodiodes) = 34 byte increments.

    My plan now is to implement a routine, that bed of 34 bytes, concludes the 'xx' sequence and the position of the extracts (allows to call the post number 'y') of the first 'x '. The program reads now y bytes. And now, the program reads again 34 bytes in a continuous cycle, each cycle starting with "xx".

    How do I know that?

    I added the plan I work at: the structure in question is placed in the first frame of time. [Note that so far, this program only reads that the 2 bytes (= first photodiode).] The first VISA Read structure must find the position of 'xx' and send it to the second structure VISA Read, who transmits to us at the beginning of the next full increase.

    Best regards

    Froebel, Friedrich G.

    Hi, Friedrich.

    I made a few changes as well as a suggestion on how to analyze your data...

  • Concatenate the strings from VISA

    Hello people,

    I'm still fairly new to LabView, please bear with me.

    I'm interested in doing a Subvi, which will receive bytes on a VISA from serial port and write each line to a greater (concatenated) string, so it can later be stored in a file. In simple terms, I want to save all the data on the serial port for 8 tests to be completed. There will be 6 cases of this in the parent VI, so he needs be modular.

    I expect a series of 8 channels of the source serial communication, each line begins with "Success" or "Failed" then the test. for example:

    Past test1

    Failure of test2

    Past of test3

    Past of test4

    .

    .

    .

    The current method I use must react when there are present bytes in the buffer in series, and then identify a match (currently it only identifies a match of 'Success').

    Is it possible to get a match for the substring to 'Success' OR 'failure '?

    How can I place all these strings on a chain? Concatenation of strings do not work because I'm having the same input string of the VI...

    Any help/input would be welcome, thank you.

    Here is a basic example of using to concatenate strings. Since it is always very difficult to know if you call your Subvi several times or if you call once and want to to read all the results I won't comment much more on it. This example would read all the results and the output format string you want to write to a file later or do whatever you want with it. The basic constructs of what you will need are illustrated here. How to encorporate in your application will be difficult to say without any code beyond the wick you have posted.

  • Serial bus - bytes to the Port returns with the disabled character of endpoint 0

    I'm new to labview...

    I am trying to connect PC to a hardware device that is customized with a UART (9600 baud, 8 bits, no parity, 1 stop bit, flowcontrol HW). The device works as follows: when a data packet)<256 bytes)="" is="" sent="" to="" it="" via="" serial="" port,="" each="" byte="" is="" echoed="" by="" the="" uart.="" after="" the="" packet="" is="" completely="" received="" the="" device="" verifies that="" the="" packet="" is="" correcly="" received,="" and="" after="" a="" delay="" (~="" 200="" msec="" or="" more),="" sends="" 2="" bytes to="" the="" host indicating="" whether="" the="" packet="" was="" ok="" or="" not.="" this="" works="" perfectly="" when="" i="" use="" hyperterminal="" to="" communicate="" with="" the="">

    I designed a simple vi to manage it. As each byte is sent, I use the "Byte to Port" property and read the byte of the echo. The problem is after all bytes are sent, I get 0 instead of 2 for the 2 bytes that I'm supposed to get. I tried to do it with the read-write property-reading vi in order, but it does not work. As you can see in the attached vi, I therefore separated this in 2 cases;

    (Real deal) during the time the package is sent and (false case) where I just (trying) to read the 2 bytes. I get 0 bytes to the port and the VISA Read vi gives me a timeout error! .... Increase the time to 1000 ms did not help either.

    Can someone take a look at the vi and suggest what is wrong and what can be done?

    It will be much appreciated.

    Franck Tulpule

    Franck,

    I agree with crossrulz.  You must set the time-out period based on the behavior of the device.

    Consider reading 1 byte at a time - all the time - and comparing the result with what you sent.  From the echoes of the unit it receives, you can use this to check communication. Once all bytes sent found an echo, then start the search for "Y" follow-up by "." follow-up by "?" to see if you get the acknowledgement of receipt. With the timeout VISA has some value based on how long you want the program to be unresponsive to user input or any other activity, you can manage the knids of crossrulz errors mentioned.

    Lynn

  • My iPhone 4 stopped working yesterday, it frustrated me because I just a call, I intended to take it to get it fixed, but my sister advised I check the support of the community and guess what? It worked! Am so excited, that I followed the instructions of

    My iPhone 4 stopped working yesterday, it frustrated me because I just a call, I intended to take it to get it fixed, but my sister advised I check the support of the community and guess what? It worked! Am so excited, I followed the instructions of the Mac, I pressed the Start button and the button operation at the same time and the magic took place, am so so excited. THANK YOU MAC!

    Glad that your phone is working again.

    What you were doing by pressing the button home and sleep for 10 seconds, until the Apple logo came back, is called "force restart '.

    You won't lose data by doing this, but it can cure a few glitches. It is usually the last thing to try before you restore the phone to factory again or visit an Apple Retail Store or Apple authorized service provider, where your phone does not at all.

    If your iPhone is not responding or won't turn on - Apple Support

  • Sometimes the lost bytes, reading the serial port

    Hello!

    I'm reading the serial port data (flow rate 57600 baud rate) that works very reliable so that I do not open any other window

    or minimize/restore my window of the application during the program is running. Then a byte of incoming data will be lost.

    I get a string of 30 bytes each 50 m in most of the cases the first byte is lost, sometimes one in the middle.

    This occurs not only on a PC.

    Is this a problem of LabVIEW or Windows?

    Are there settings that can solve the problem?

    Best regards

    JK78

    I solved the problem.  

    There was a bug in my program who become visible only if a window has been reduced or restored.

    When there are two or more messages in the buffer VISA, the separation of the messages was incorrect.

    Array index corresponded to false so that the first byte of the second message was at the end of the first

    and so the second message in the buffer seemed incomplete.

    In normal operation, the playback loop runs so fast, never both messages are in the buffer.

    Thanks for all replies.

    JK78

    Either way, I work with LabVIEW 2009 and serial interface hardware motherboard. With XON/XOFF flow control

    is not possible in my application because all the hex values from 00 h to FFh may appear in a message.

  • ATTENTION: lack of events in the event log

    I am slot as Vista Home Premium 64-bit. I have never received this warning before in a reliability and a report on the return, but three times today I received a warning that lack of events in the log. The percentage varies with each data collection. As you know that surely, he asserts that a possibility is ETW buffers and buffer size may be too small but it has never had this problem before. I ran a chkdsk and has not helped. I checked services and turned everything on automatic to make sure that all services are in the State of the device of the necessary Log data collection.

    What I do or is - nothing.

    Hello

    You can follow the links below and check if they are a help.

    http://msdn.Microsoft.com/en-us/library/ff190866.aspx

    http://social.msdn.Microsoft.com/forums/en/ETW/thread/a1aa1350-41A0-4490-9ae3-9b4520aeb9d4

    If this does not help, you can post your request in the MSDN forums for assistance.

    http://social.msdn.Microsoft.com/forums/en/ETW/threads

    Amrita M

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

  • Best practices Check - Configuration of the Communication Service

    So, we have the following here the use case...

    Background:

    We have a FMS instance that has several teams using multiple applications, air conditioned and have their own specific communication needs. Teams of infrastructure, such as the database or Server team are also included on this FMS. We have services configured around applications and their dependencies, so a single object will exist in several services.

    To work around the lack of granularity configuration and horrible the service-based E-mail in the form, I created an event rule that queries for FSMServices affected for a given event and iterates over all the unique services, pulling on the notification settings through our way of soil and trigger Actions from the command line or appropriate accordingly EmailActions... we use of the-d in the field of shortDesc service options.

    Example:

    (You can ask for a detailed explanation of what do the settings, if you wish, or that the levels called - but they are just an additive representation of the levels of severity in foglight)

    Here's our new problem:

    We have teams who want notification on certain rules of certain severities (such as criticism), but not others. This has created the need for a 'white list' or the 'black list' of the original names of rule for the event to determine whether an event should be communicated to our NOC or paged on our teams.

    My solution of thought:


    We will create a new cartridge (FoglightCommunication) that contains a custom dashboard and the definition of the topology for a FSMServiceConfig object. This object contains a white list or black list for some rules should be provided for each service. This TopologyObject would also resume functionality which serve as my current shortDesc variables... Essentially, it would contain all THE information relevant to its corresponding FSMService object configuration. We have experience in creating modules advanced both in the creation of Foglight cartridge/agents/topology definitions.

    The dashboard would exist to facilitate the configuration of this new object and to facilitate the visualization of the current communication service. This would also allow our team to allow the teams less educated with Foglight feature more easily and completely configure their own communication service. Empowering the team owner is always a good thing

    My Question:

    Did someone in the quest (it's such a name cooler than Dell) sees a problem with this? My only concern is that we could lose all our configuration information to uninstall the cartridge for a upgrade problem. He might consider a work around with an option to export/import... but it's a messy solution and a non-human evidence. Is there a way to specify the data to be persisted, even if the cartridge that has defined this topology definition is uninstalled?

    I'd appreciate any comments or thoughts. Thank you!

    Hi Adam.

    This looks like a very useful customization. I don't see why your team should not move forward with that.

    I also like the idea of building an import/export feature in your cartridge in order to preserve the configurations in case you need to uninstall the cartridge. Note that even in this case, type of custom topology that was written to the repository data Foglight will always be there (i.e. it will not be served unless you specifically request this) - so you can be able to get Foglight to save the configuration information important for you.

    I encourage you to update the community on your progress on this and send questions, screencaps, etc., as needed.

    Thank you!

    Robert Statsinger

  • WMP12 displays 0 bytes to the size of the playlist

    My worksheet in WMP12 library displays all relevant information for each piece of music by artist, composer, Bitrate, etc. - but 0 bytes in the column size. When one of my playlists is selected with the same layout of the worksheet, they all display the size for each track. Any suggestions on how to fix this?

    After having searched still unresolved and scorn several negative comments in the community on the service of library restoration, I decided to take the bull by the horns and try to 'Restore the library' - having first set a restore point. I am pleased to announce that WMP restored library exactly as it was, with the informed size column. He also set volume leveling on all tracks in the process and - unexpectedly a little - also restored my photo collection. Yes, job done! Thanks for your interest.

  • Connect to support the community redirects to new account set up

    I was looking for answers to "spinning beach ball" for my husband and had to change the password on their computer, as he had forgotten it.  Since then, when I "sign in" to the community to support him on his computer, I am redirected to "create a new account page.  Obviously, I'm sending you this from my computer, but I have identified his computer in the answers below.  Any thoughts?

    Meg

    Have you changed his password Apple ID? In this case, this is how the best way is accomplished:

    Change your Apple ID - Apple Support password

    Or are you referring to his admin password account on the computer?

Maybe you are looking for