Problem formatting of serial communication

I am communicating with a host machine that spits out data on the serial port.  I'm using fairly standard settings (9600, 8, N-1) and I'm getting data.

The problem is the formatting of the data.  Obviously, the data are supposed to be fixed width, but the fields are moved after each CR/LF.

Some examples of data:

0   |    0.925.    0,833 |   110.444 |   549.278 |    23.812 |
|  2   |
0   |    0,921 |    0,832 |   106.971 |   480.604 |    24.464 |
|  3   |
0   |    0.926 |    0.831 |   114.320 |   555.821 |    23,785 |
|  4   |
0   |    0.920 |    0.830 |   108.434 |   587.374 |    23.411 |
|  5   |
0   |    0.925.    0.836 |   106.459 |   554.808 |    23.717 |
|  6   |
0   |    0,923 |    0.830 |   112.048 |   507.875 |    24.242 |
|  7   |     0
|    0.924 |    0,837 |   103.943 |   605.860 |    23.181 |
|  8   |     0
|    0,921 |    0.831 |   108.303 |   582.447 |    23,459.
|  9   |     0
|    0.925.    0,827 |   118.501 |   426.680 |    25.118 |
| 10.     0
|    0,922 |    0,826 |   116.223 |   483.567 |    24.527 |
| 11.     0   |

Any ideas what may be the cause?  There the series parameters that may change the data format?  I get the same results using LabVIEW and hyperterminal.

I have No control over the host (long story).

Thanks for your help.

Set the properties of your VISA to "activate the term on readings tank" = TRUE and "term char" = 0x0A (line feed).  Configure your reading to read MORE characters that you expect and each reading will end when we see a 0x0A. (you can remove the warning from VISA if you wish.

-What happened to the cursor - this lack of cursor's post a little harder! Laura_F - is this known?

Tags: NI Hardware

Similar Questions

  • VISA + Serial Communication - need help!

    Hello world

    I have a lot of help with my project of this forum and I'm looking for more . Thank you for taking the time to help. Please bear with my as I ask a LOT of questions.

    I intend to control a frequency converter using its series terminals and send orders from my PC + LabVIEW it. The commands do the basic functions like, start, stop, speed up/down etc etc. I use a converter Series USB to transfer data.

    Now, I ve played with examples like SERIAL COMMUNICATION VI and others and I begin to understand the functioning of VISA.

    Q1. In order for LabVIEW + VISA contact my frequency converter, do I need to install some sort of a driver for him to recognize? The frequency controller is old ages, even I don't know and I don't think I can find a driver for it any time soon? What kind of driver I'm looking for? Is it possible to customize my own driver and which would be easy?

    accessory included - process.jpg

    I downloaded some pictures about the problems of data format. I need to send information to the converter to format "telegram" as shown in the image below. Each 'function' in the 'format telegram' has varied length in bytes: some have 1 others have 2, other 4...

    I also downloaded an image called "Format.jpg" which indicates what information each of these 'functions' will contain. Note:-the frequency converter uses only the last 4 bits.

    Say for example:

    START function will have this bit of information-

    Start the Byte - ASCII ' 59 "

    Address - 00

    Control character -? I'm not sure what it should be I need to use the converter based on parameter values - is confused on what to choose - C, U, I or r Start, stop, etc. have their own specific parameter values such as 402, 404 RESP, so I guess I want update (U)?

    Word of State control -? depends on the previous action

    Sign - do not necessary

    Data - 0

    Comma - is not necessary

    check the sum - is not necessary

    Stop the Byte - ' > ' (ASCII: 62)

    Phew... How would I go about clubbing this whole format together to send a control signal? Put all this information in a table allow somehow?

    Please help to me... to achieve desperately need...

    Thank you

    Sandeep

    It would be useful that you could find a driver, but it is not absolutely necessary to have a. You can write your own, use the Instrument i/o Assistant, or use VISA readings and some discreet.

    The format of the commands is a bit complicated but not impossible. You just need to be careful to have the exact number of bytes.

    What I don't see in the atttachments, it is possible words to control and the State and the number of parameter. I hope these are in another part of the manual.

    A bytes example (without the control and settings) to update the frequency to 12.34 could be '<00U________+123403??>'.

  • 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

  • Serial communication - ignore parity error

    I have a question about how LabVIEW opens a serial port for communication. I communicate with a device that uses a protocol owner. It sets and clears the parity bit to indicate the nature of the response. For example, the orders are sent with the parity bit higher while responses are sent with the weak parity bit (unless the answer is at the end of the transmission, in which case the device sets the parity bit high to indicate).

    My problem is the way that LabVIEW opens the serial port for communication. Using Portmon, that I captured the control indicators, that it sends to Windows to configure serial communication:

    IOCTL_SERIAL_SET_LINE_CONTROL   Serial0 SUCCESS StopBits: 1 Parity: MARK WordLength: 8IOCTL_SERIAL_SET_CHAR  Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13IOCTL_SERIAL_SET_HANDFLOW  Serial0 SUCCESS Shake:1 Replace:44 XonLimit:64 XoffLimit:64
    

    Note the values 'Shake' and 'replace '. In my view, they are originally bytes with parity errors is removed. A separate RS232 Comm Debug tool that I use with success looks like this:

    IOCTL_SERIAL_SET_LINE_CONTROL    Serial0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8IOCTL_SERIAL_SET_CHAR  Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13IOCTL_SERIAL_SET_HANDFLOW  Serial0 SUCCESS Shake:0 Replace:80000000 XonLimit:128 XoffLimit:128
    

    Notice the difference in values. By using this tool, Windows does not packages with parity errors - that's what I want. Is there any way to change how LabVIEW opens the serial communication port to achieve?

    I tried to change the parity, where the ILO is defined differently, but I think that I am running in a race condition; LabVIEW can not run the code and change the mode of fast enough parity before the next byte of data is sent by the device.

    Ravens fan: the parity bit, in the proprietary protocol, that I use, is not used for parity checking. Basically, the protocol uses a 9-bit serial communication. The parity bit must be paid or compensated according to what byte do (if it is a command, if it is the end of transmission, etc.).

    I found an old post on this page which seems to answer my question (my apologies for not completely research before posting... I learn the right use/search phrases that I find more information). I download the 3.4.1 version of VISA now.

  • Programming of the digital I/o pins on the NOR myRIO-9100 for serial communication

    I use NEITHER myRIO for my robot and I want to use four reading of the distance sensors that communicate via the serial port. But the myRIO has only two UART ports on board so I was wondering if there is a way to program the digital pins use for serial communication. Any help appreciated.

    It is possible.  Here is an example that I could find.

    Example of reference to RS-232 for LabVIEW FPGA Interface

  • Hello. I'm having a problem with my serial number adobe

    Hello. I'm having a problem with my serial number adobe

    If this is part of a suite, you may need to install the suite files.

    Error: "serial number is not valid for this product". Adobe Creative Suite

  • Problems with the simple serial communication.

    I followed a tutorial online to start learning basic communication series. The involved tutorial shorting pins 1 and 3 on port 1 Comm and write a simple program (attached). I've edited it a bit, the program to see varied results I get when trying to write and read a simple sentence via a serial port.

    Could someone explain what causes the kind of result shown in "Serial Comm example.png"? I think it has to do with timing. Why would be transmitted only the parts of the sentence?

    Thank you

    Sarah

    sarahzig wrote:

    The involved tutorial shorting pins 1 and 3 on the Comm 1 port

    What should be pins 2 and 3?  On a standard serial port DB-9, pin 2 is the receive and pin 3 is the transmission.

    Now for your code...

    1. move the Serial Port to be before the loop to set it up.  Simply configure the port once.

    2. close the port after the loop.

    3. managing your error after closing.

    4 stop your loop on an error or the stop button has been pressed.  You will need a RC in there.

    5. no need to Flush Buffer function.  Remove it.

    6. using the bytes to the Port is a dangerous thing.  It introduced all kinds of race conditions that are interesting.  Instead, say VISA reading to read the number of bytes that you expect to read.

    6a. Moreover, don't forget to send a character to end of line at the end of your data and all the number of bytes to read something a lot more than you ever expect read.  The VISA read will stop reading when he a) sees the number of bytes, it was said to read, b) sees the stop character (currently enabled and set to a line break, which is part of the end of line), or c) the time-out occurs.  Whichever comes first.

    7. with 6, the wait is no longer necessary.

  • Watlow F4D Serial Communication problem error Code-1073807339 VISA Read in Watlow F4.lvlib:Utility MODBUS RTU receive message

    Hello

    I am trying to contact a Watlow F4D controller on a room using RS232. I use a cable converter USB-series and NI Watlow F4D Serial Driver.

    The code of error-1073807339 occurs in:

    Read in F4.lvlib:Utility MODBUS RTU Watlow VISA receive message-> Watlow F4.lvlib:Utility Register.vi reading

    I don't know what caused the problem. I am able to see the cable converter USB-Serial OR max. Please see the pictures for more details

    Thank you

    Felix


  • Serial communication cause the crash of LabView

    Hello

    I'm set to do a serial with Labview. The problem is that the program always crash (no popup error but only LabView don't freeze) when I read or write with VISA.

    I work with a module converter (ADAM 4571) that convert Ethernet to RS-232/422/485. The module is mapped to the computer and the similar work as a COM port. I tested the connection with the Terminal windows and its work. This means that it is not a hardware problem.

    I did the same communication a few weeks with the same material and did not have a problem. I don't understand why it does not work now.

    I give my code as an attachment, but it is not something special except for the block that buffered (which is required for my module), but if I remove it the problem persists.

    Does anyone have an idea what can be the problem?

    Thank you

    Jérôme

    OK, I solved the problem.

    The version of the driver for the converter module mapping was not exactly right, now I change it and its work.

    Jérôme

  • Problem using the serial port with windows 7

    Hello

    I have a modem of SIM cards (used to update remote controller of the electronic gate) that connects to my computer via the serieal port (COM1).

    The modem comes with its own piece of software that worked fine on my old computer with windows 7 (I had a similar problem, but then I just need to update the driver).

    I now have a new computer and I am unable to connect using the modem (I think I'm using the latest drivers for the serial port).

    Is it possible that I need an older version? If so, how can I get a?

    My motherboard is a GIGABYTE H81M-D2V.

    Any ideas?

    Thank you

    AVI

    Hi Avi,

    Thank you for the update on the issue.

    The UART, or Universal Asynchronous Receiver / Transmitter, is a characteristic of your microcontroller useful to connect serial data (text, numbers, etc.) to your PC. The unit switches incoming parallel information (in the microcontroller/PC) to series data that can be sent over a communication line.

    According to the description you provided it seems that your modem isn't connecting with your Windows 7 computer, then I would contact Duetech Berès your modem manufacturer, so that they provide you with the steps to set it up.

    Get back to us after contacting them and please get back to us with your question was last updated.

    Kind regards.

  • Flex to the problem of web service communication

    Hi, just like the title of State, I have problem during the web service-> Flex communication. I use class WebService ActionScript, to establish a connection with her, but I had a strange behavior. When I try to access the remote web services (particularly: http://109.74.206.146:8080/jax_ws/quarkservice? wsdl ) of my Flex Builder IDE, all is well. Even more, when I spend my folder and click ProjectName.swf project folder, without any server runs on my pc, the file is executed, communication with the web service is impeccable performed and response is retrieved. However, when I try to export a release build and to my Tomcat localhost, or if I try to copy ProjectName.swf to any other location on my drive, since the location of the project, where is stored, I got:

    1. [RPC Fault faultString = "Error in security to access the url" faultCode = "Channel.Security.Error" faultDetail = "unable to load WSDL. If there are currently online, please verify the format of the WSDL and URI file (http://109.74.206.146:8080/jax_ws/quarkservice? wsdl) "] "

    2A mx.rpc.wsdl::WSDLLoader/faultHandler() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\ws dl\WSDLLoader.as:98]

    3A flash.events::EventDispatcher/dispatchEventFunction()

    4. in the flash.events::EventDispatcher/dispatchEvent()

    5 at mx.rpc::AbstractInvoker /() [E:\dev\3.0.x\frameworks\pro jects\rpc\src\mx\rpc\AbstractInvoker.as:168] http://www.adobe.com/2006/flex/mx/internal:dispatchRpcEvent

    6 to mx.rpc::AbstractInvoker /() [E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:220] http://www.adobe.com/2006/flex/mx/internal:faultHandler

    7A mx.rpc::Responder/fault() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49]

    8A mx.rpc::AsyncRequest/fault() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]

    9A DirectHTTPMessageResponder / securityErrorHandler ([E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368])

    10. at flash.events::EventDispatcher/dispatchEventFunction()

    11. in the flash.events::EventDispatcher/dispatchEvent()

    12. to flash.net::URLLoader/redirectEvent()

    [Error CPP faultString = "Error in security to access the url" faultCode = "Channel.Security.Error" faultDetail = "unable to load WSDL.

    < br / > if there are currently online, please verify the format of the WSDL and URI file (http://109.74.206.146:8080/jax_ws/quarkservice? wsdl) "] to "

    MX. RPC.wsdl::WSDLLoader/FaultHandler() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\wsd l\WSDLLoader.as:98]

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent() to mx.rpc::AbstractInvoker / http://www.Adobe.com/2006/Flex/MX/internal:dispatchRpcEvent ([E:\dev\3.0.x\frameworks\pro jects\rpc\src\mx\rpc\AbstractInvoker.as:168])

    to mx.rpc::AbstractInvoker / (http://www.adobe.com/2006/flex/mx/internal::faultHandler) [E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc \AbstractInvoker.as:220] )

    at mx.rpc::Responder/fault() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49]

    at mx.rpc::AsyncRequest/fault() [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]

    to DirectHTTPMessageResponder / securityErrorHandler ([E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368])

    at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/redirectEvent()

    Thus the same file committed since the FlexBuilder or invoked directly from the folder of the project, where it resides, works perfectly. When I try to call from a DIFFERENT location, including deployment on my local Tomcat (or even just my office), I got the above exception. So, anyone know what is the problem? Thank you

    There is an implicit approval when you run the application in Flex Builder. Outside of Flex Builder, if the call to the Web service is not mandated by LiveCycle Data Services, Flash Player security will not allow the connection the remote service.

    Try to add a crossdomain.xml to the ROOT.war of your respective application server. Something like that...

    http://www.Macromedia.com/XML/DTDs/cross-domain-policy.DTD">

    Steve

  • hex and serial communication

    Hello!

    I'm trying to get the information from a device that has only one-way communication, so I want my device sent a commando who opens a relay, and then I can measure whether or not the relay is opened using the CTS and check for voltage differers. The commandos must be five bytes long and hexadecimal code, I want to read a long 16-bit number. String constants are known orders and are written spell display.

    The code attached does not work and I suspect it's the type of Hex conversion that causes the problem?

    Hi ollef,

    Please refer to this actual thread, which deals with "hex" vs "decimal" in a fairly long way.

    And Yes, the conversion "to the hexadecimal string" wrong here

  • Serial communication is blocking my time loop

    Hello world. I need your help with my program. I use LabView2014 and a B2902A Agilent.
    I want to measure the current value with my instrument continuously, store the values of every second and the display of the messages received through the serial port when I'm gone.
    Everything works perfectly separately, but when I put everything together I have this problem: my instrument is waiting for a message from the serial port to take (and display) a measure.
    You have an idea to save my problem?
    Thank you!

    Pauline

    (Please find attached a screenshot of my program)

    Use the byte to serial port to check if a message is available and read only when a message is available.

  • serial communication - program is slow

    Hello community,

    I have a problem: I'm using LabVIEW to communicate with a CPU with RS232, but the program is extremely slow. In this configuration (it's a minimal example), it takes about 8 seconds to send a new string. What could be wrong? (I'm a beginner)

    The program of mission is to prepare a string containing incrementing values and send over the UART.

    Thanks for your help!

    Greetings!

    The yellow bulb is to highlight execution.  It is strictly a debugging tool.  Your turn that to slow down execution and be able to see how the data passes through the wires.

    Disable execution of climax, and it will run at full speed.

    But how do you use this VI?  You have not a while loop and you have not told me if an another VI call this VI.  So this VI runs only once and then stops.

    (Please don't tell me you use run continuously the button which is also strictly a debugging tool.)

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • 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.

Maybe you are looking for

  • MacBook Pro fan ap

    Have a 2008 17 MBP, now with 1 TB SSD. It heats up and I am deaf so need a fan ap to see his work. Last rev of El Capitan works well. What ap to get? Thank you! JIm in Chicago

  • Corrupted or missing boot win 7 64-bit ultimate

    I have a HP envy 14 beats edition which has a corrupt or missing of boot files.  The instructions are very simple, enter your windows cd, select language and then repair.  What happens if my laptop does not come with a cd of windows, just a restore c

  • Will be my HP Pavillion guaranteed zero?

    Hello I have a HP Pavilion m9788d desktop PC. I would like to know if I want to add RAM, my warranty HP will be zero? I ask this question is because there is a sticker behind my computer HP warranty, and if I open the case of the thumbnail will be br

  • HP Officejet 6500 a: align the printheads

    There is no black printing when printing a document.  I changed all 4 cartirdges, cleaned the heads but always without success.  When I go to SNAP PRINTHED I get an ALIGNMENT FAILURE error message.  REFER TO THE DOCUMENTATION FOR THE DEVICE FOR MORE

  • Is it possible to display multiple images on screen Imaq?

    Hi, I need a little help here. I captured 5 images of a webcam for their treatment. At the end of the treatment, that I need to show to the user, executives 5 but I don't want to use 5 imaq display. I've tried the image browser, and even if it works,