analysis of the chain of the serial port to retrieve data

Hi all

It is a problem of beginner. I have two sensors sending data to a same wireless serial port. In order to distinguish which is which. I coded each sensor to send data with a unique address UoL 000 X, then followed by two values, I want to read. These two values are in the float with format fixed impression (decimal fixed after the third bit). The format string of the first sensor should looks like UoL 0001 123,45678 876.54321. I use the Scan of the String function, unfortunately, it doesn't work that way. Could you please check the VI for me? Or a better solution for this application. Thank you very much.

S.G

It does not because what you have set is not different from what you have joined earlier.  Have you tried something?

See this amendment attached to your VI.  The format strings work with the examples you gave, and sends the data to the appropriate indicator.

Also, I cleaned up the mess that the inner loop where you were waiting for 1 or more bytes.  Which means most of the time that you would probably get an incomplete message.

Tags: NI Software

Similar Questions

  • How use the serial port read and display the text but not scroll off the screen?

    I'm new-ish/return user fan of Labview and trying to change the example VI "Advanced serial write and read VI" is the part of the dev suite 2012.  I need to use the string box for ALL of the text from a serial port, always adding and just roll off the screen when the actuals come to the serial port.

    What actually arrived more than bytes (or no bytes AT ALL!), during reading time text, current rolls out of the box in the chain.  Even when receiving 0 bytes, screen is removed.  I'm not very familiar with the locations of functions and even worse to understand obscure references to functions, so please keep very basic answers so I can follow.

    Just to be clear, I need window of the chain behave as HyperTerminal does always displays the data and it is not pushed by window arbitrarily.

    Thank you

    Steve

    A long shot.

    Is that what you want?

  • Using the Serial Port on the HP 50 g graphic calculator

    Hello world

    I have another question. I want to use the Serial Port on the HP 50 g to connect with another device. The device is called the MFJ-1214PC. What it does is to accept the text and commands through a 9-pin serial Port and converts the text in a Code Morse/RTTY sound audible. It also decodes Audible the Morse Code and RTTY radio signals and displays them as text on your computer. The program that controls the MFJ-1214PC was originally written for an IBM PC for the MS-DOS operating system. The HP 50 g graphic calculator meets the system requirements for the simplest version of the program. I was wondering if there is an MS-DOS emulator written for the HP 50 g, which would allow the HP 50 g to become the computer in this case, or if the program could be rewritten and brought to the HP 50 g. If it could be rewritten, programming language what do you think would be better suited to this type of application (if it is even possible?) or UserRPL, SystemRPL or Assembly. Don't forget that I'm a complete newbie with the HP50g and have never programmed with it yet. I'll include the manual of the MFJ-1214 PC as an attachment so that you won't have to look for him. Thank you in advance for your help!

    ~ Zekelegge ~.

    I understand (from my brief overview) out of the box-MFJ-1214PC, this offer box decoder output series computer.  The computer (50g in your case) will have the software to read message series and then convert that to an output for display.

    BartDb gave you the right answer.

    A serial cable with the correct speed level and reversing lever to manage as well as the 50G has a RS-232 signal to the outside world is the ideal solution.

    However, make sure that the output of the decoder box series package can be understood by the 50 g. aud, bits, etc.   (you have the set-top box manual, so you'll have to look that up)

    the streamsmart is not an aggregator of serial port.

    in other words, these connectors DIN of Qty 4 on the front do not accept series rs-232 input and send then to 50 G.

    I'm not an expert, streamsmart more info on these boxes is rare to find.  The probes are even more rare.

    However, I know that the 4 connectors are for the analog-to-digital conversion in the probes.  The streamsmart works as a "data logger" in which he sees the input probe, the A/D converted, then sends it to the 50G (or a computer via the USB port).

    In addition to the solution of Bart, there was another named Tiwag forum poster who created a serial cable and displayed a schematic representation of the cable.  This information can be found here:

    https://groups.Google.com/Forum/?fromgroups#! searchIn/comp.sys.HP48/serial$20port/comp.sys.HP48/ltcane1jSOw/uHyw2Ti03kgJ

    to see an example of programming to use the serial port of 50G, you can reference the following hpcalc GPS data collection program.

    http://www.HPCalc.org/details.php?id=7105

    It is written in userrpl so can be crossed with the reference of users advanced for the translation of the syntax.

    It seems that the main routine of concern for the comm to the gps is in the file "GPS >.

  • Part number for the serial port in option HP Z420

    I am looking for the serial port in option for the HP Workstation Z420, but in a datasheet, it is only mentioned as an optional serial port kit.

    What is the number on the right side of the product? The same for the workstation Z400 was PA716A, but it was not compatible with the new workstation model...

    I used the same part number, I used to model Z400 and it seems to work well.
    HP code is PA716A.

  • What standard corresponds to the Serial Port of the Tecra A9

    What standard corresponds to the Serial Port of the Tecra A9?
    What is RS - 232?

    All I know is that it s a serial port 9-pin

  • Tecra A8: external keyboard connected to the serial port: the necessary specific configurations?

    Hello
    I want to share a monitor and an external keyboard with Tecra A8 and a desktop computer. To do this, I bought a switch 2-port Linksys where I plugged the external monitor and a keyboard. With the monitor without problem because there is a specific port for this. However my Tecra has only 3 USB ports and a serial port 6-pin where I connected (with a 6-pin Mini DIN adapter) on the keyboard. When I turn on the screen it's ok, but the keyboard (I also tried a mouse) does not work. Do I need a specific configuration on the serial port to accept the external keyboard? If so, what commands do I need on the XP operating system?
    Thank you
    Luis

    RGB (monitor) port used to connect the external monitor.
    If you want to connect the external keyboard, you have to use the USB ports.
    Additional legacy USB emulation must be enabled for the keyboard.
    These settings you can change in the Toshiba HWSetup under control panel.

    If you connect multiple devices to the switch USB (hub) Please be sure that the USB hub using external power.
    A low power USB could be a reason for the external USB device failure.

  • How to periodically send various types of data via the Serial Port?

    Hello! Everyone

    I have to send data to LabVIEW to my device on the Serial Port.

    I know how to send data on serial port in LABVIEW, I already have this part.

    Now the problem is that I have several types of data I need to question my embedded device, if I want to send the query periodically command.

    So lets say that my four Op Codes are the following, which will send four different types of query command to my device on the serial port.

    (To be honest only OP_LED and OP_SENSOR is used now)

    0, OP_SYNC

    1, OP_LED

    2, OP_SENSOR

    3, OP_FUTURE

    Structure of basic package is as follows:

    Header (0x2C), Checksum, length of the data (n bytes), Op_Code (1 byte), length (length of Code + data Op)

    For OP_LED, I need to send the package as follows:

    0x2c 0x02 0x01 0 x 00 0x2F (0x2F being the XOR checksum) (calculation of Checksum part is done and SUB Vi form)

    Length of the package this is 0x02

    0x01 is Op Code for OP_LED

    In the same way

    For OP_SENSORi need to send the package as follows:

    0x2c 0x03 0x02 0x00 0 x 00 0x2D (0x2D being the XOR checksum) (calculation of Checksum part is done and SUB Vi form)

    0x03 is length of packet here

    0x02 is Op Code for OP_SENSOR

    So, how can I do this periodically in labview, in such sort that period can be adjusted whenever necessary.

    Is there something in LabVIEW to do.

    I had done the reception and decoding part and working properly.

    http://forums.NI.com/T5/LabVIEW/store-data-coming-from-serial-port-in-buffer-and-then-take/m-p/32722...

    So I must implement read and write the part of same while loop?

    Do not insert in the table if you put data in an array at index 0.  Just use array to build.

    No need to have Visa to write don't be a part of wire to the wire of reference and error VISA go in the upper part.  These wires should go THROUGH the entry VISA.

    Don't your checksum requires all the bytes up through data?  Righ now, you only put the checksum on data bytes and forget the opcode and length bytes.

    Your sending is not the opcode for Opsync or Opfuture.  You just send the empty tables.  At the same time for the other two, you put the opcode in the data table.  All your original opcode in the table build thread.  Get the data out of these structures in case item which is supposed to represent the opcode.

    xpress_embedo wrote:

    Now it works but I have now two problems.

    (1) OP_SYNC and OP_FUTURE do not data, but still receive its data on serial port, can I do something here as I have nothing when the table is empty in the structure of the case.

    I do not understand this statement.  Perhaps my answer above will fix any issue you have here.

    (2) how can selection operation Code to be send is done using control façade but real application, this task should be automated to a certain frequency, like OP_LED package must go out to the serial port to 100msec and packet OP_SENSOR must go out to 1000msec, I do this.

    Now you agree a little more architecture.  I would encapsulate the code that is in the while loop as a Subvi.  Then with the hand of your program while loop, use two time Express VI, a game for 100 msec, the other for 1000 msec.  When an express VI is true, run the Subvi with a command set waiting for the answer.  When the other VI Express is true, have it run the Subvi with the other set of commands.

    The device responds with anything when you send these commands?  You only send data.  I see no VISA Read to be able to recover all the data.

  • Store data from the Serial Port in the buffer and then take action?

    Hello! Everyone,

    I'm new to LabVIEW and I take assistance from various videos and stuffs available online to get started with LabVIEW.

    But I have a duty, therefore needing help.

    initially I see some of the tutorial videos and learned about the LabVIEW interface, and does a little project to communicate with the Port series (receiving and sending data).

    Happens to my task.

    My LabVIEW application will send a few State request packets on my device or control and based on the response packet that I have to display values.

    The Structure of package is as

    Header, length, Op_Code, data Checksum

    There is no terminator as newline or carriage return or anything else.

    In C language, I read the data from the Serial Port, and based on the length, I conclude that I got the full package or not, and then by recalculating the checksum value, the integrity of the package is verified and then based on that Op-Code has been sent will be decided.

    (I'm dealing with hexadecimal data)

    But how can I do this in LabVIEW.
    A tutorial or any referece will be useful for me.

    1. I suggest that you learn to use Shift Registers instead of local and global variables.  They are much more efficient (memory and execution speed) and make it much easier to read the schema.

    2. you don't need this inside the loop property node.  Is there a way to configure a Serial Port to turn off the stop character.

    3. you don't need to wait for playback VISA will limit the rate of loop if no data is coming.

    4. Once you have the length, you simply read the rest of the entire message and process it at a time.  This will make things a LOT faster.

    5. you should really do this enum a def type so that you can ensure that all your enum constants have the same values.  If you need to add a State later, simply update your enum in the same place then.

  • collection of data & graphical CTS (M-24) using the serial port

    I work to collect data of a test (M-24) CTS station, using the serial number of the station to the serial port on my laptop.

    Looking for information on the vi.

    There is no driver for this instrument (I guess you are referring to this: http://www.cincinnati-test.com/sent_m24.php) on IDNET. Therefore, unless someone has already written an and happen to run across this thread, you will need to write one yourself. It is not hard to do, but you will need programming manual. There are a number of resources to help you write one: http://www.ni.com/devzone/idnet/development.htm. Since you intend to make the serial communication, you should also look over this: http://zone.ni.com/devzone/cda/tut/p/id/4370

  • Can not read the serial port VISA without MAX

    Hello

    I'm trying to build an application that will interface with a Black Cat Systems GM-10 radiation detector.

    The app works fine on my computer (with the full development system OR) but when I install it on another computer, without LabView, the application cannot see the serial port!

    I checked that the driver is installed correctl and Windows can see the device, but when I run my program, he can't seem to access the serial ports.

    I then tried to install MAX on the second computer, how the application worked well, but as I install this app in other places, I don't really have the ability to install MAX everywhere (software must be autonomous).

    Any help would be appreciated!

    Z

    I would have joined the project file, but the forums seem to not want to allow me to download that big of a file.

    What version of LabVIEW are you using? With 8.x, the installer is very able to install the runtime of NI-VISA and MAX. If you are using an older version of LabVIEW, there is an option to include the series VISA support. Install just MAX will do nothing to make the available ports. This is the VISA that does this.

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

  • level of tension for the serial port sbRIO

    What are the levels of RS - 232 votage on sbRIO serial ports?  Signal levels might be: 3.3 V, ± 5 V, ± 10 V, ±12 V and ± 15 V?   ±12 v what I often see for a direct connection to the serial port of a PC.

    Hi Matthew,

    The signal levels to the sbRIO-9605/06/23/26/33/36 are ±5V. I took a quick screenshot of TX W.R.T. GND. Tensions in the data sheet the standard ±5.4V (typical) loading with 3 k and a minum of ±5.0V. The RS-232 standard can accept a pretty big swing however (-3V to-25V) and (+ 3V to + 25V) for two levels of logic. The screen was shot I took with a unloadeed line so the voltage levels appear to be higher than most.

    The transceiver set used is the MAX3243.

  • read the serial port PIN +.

    Hello!
    Ive got a question on the serial port. I don't want to make any communication on the port. I want to directly connect an instrument (later), the pin of the connector series #2. On the PIN, I need to read impulses. I am able to read the port pin series, who is active? I know, I can do it on the parallel port. With the port. VI, I give the address of the port, check the D0 PIN for example and the result I can indicate on a led indicator. I want to do the same thing on serial port, because later the target pc will be ve no parallel port. Is this possible? Can you give a statement of departure?
    Thank you very much for your help!
    Mr. Gabor

    You can read the down state from some other lines, DTR, RTS, etc.. There is an example that comes with LabVIEW. Open example Finder (help-> find examples) and search for "Troubleshooting Serial Line Monitor" example (just search "series").

    This can be considered an e/s digital interface a poor man, depending on what you are doing, you can be better with a 'real' digital i/o interface.

  • Transfer an image via the serial port of PC to PC

    Hello world

    can someone help me to transfer an image file to another PC with Labview via serial port?

    I tried to use the IMAQ functions to decode the image to a string. but there is a problem at the receiving end to retrieve the image.

    is there an easy way to just sent and receive an image via the serial port file?

    Thanking you in advance.

    Morgane

    Hello

    I love people who love to learn. Thanks for listening.

    I updated read and write Subvi is because I believe keeping simple and straight threads more readable program and less bugs remain.

    Even better, my eyes straight lines i do not get tired too soon.

    good luck with your program.

  • Using the Serial Port for data acquisition Non-Serial

    I searched the forums and can't find anything on this topic.

    I saw that it was possible to use the parallel port for e/s digital single and I was hoping that the serial port can be configured the same. It seems all VI VISA only to use the serial port to receive ASCII characters at a given flow rate, but is it possible to simply query the status of the line series at my own speed to see if it is high or low, kind of like a single pin DAQ?

    It seems that it would be possible until the serial data are read and controlled by labview, not Windows. Let me know if you have ideas of how to approach this problem, or any comment as to why it is not possible.

    Thank you all!

    Select the property > settings series > Modem of the line parameters. For example, the State of the CTS is an entry to the pc.

    With the help of these lines is a very poor substitute for a scope or map DAQ. The only things you can return is Asserted, Unknown or Unasserted. The range of acceptable signals is important enough. Anything between + 3 and -3 is an unknown state. Your other signals is + / 3 to 15 volts. What type of signals do you really want to capture?

    Edit: there is no such thing as a visa so I have no idea of what you actually use.

Maybe you are looking for

  • Bluetooth security

    HelloMy son just bought a doggle to connect its Bluetooth phone. My problem is that he found my pc looking and I use confidential information for work, it can access my laptop with the device to show on his computer and if so is there anything to pre

  • TOSHIBA Power Saver

    I'm trying to get to where when I close my laptop it will not be in hibernation. When I right click and go to properties on my desktop it says I need to use Toshiba Power Saver. When I install it I reboot and everything, but then can't find where it

  • Button new message in mail has stopped working

    Can I get a new message by choosing new message on file, but the button has no effect. I restarted the computer, checked connections and am able to send and receive mail. Just the button does not work.

  • Duplex charger HP 8620 document Mac error - 'the scanner could not complete the scan.

    Hello When the analysis attempted double helped since the document feeder, I get the following error: the scanner was unable to complete the scan If I don't select duplex option, the printer scans very well. I really need the duplex feature was that

  • HP Compaq Presario CQ42: BIOS password HP Compaq Presario CQ42 administrative

    Hello I try to access BIOS but it asks for administrator password. After entering the password 3 times it shows the error message with the code 65717170. Please help me. Thank you.