Waiting for data on serial port

Hello everyone.

I'm trying to figure out how I can solve a problem on LabView. I programmed an Arduino board to read and send a data table of the accelerometer on the serial port. I want to LabView to receive the data and graphs it. My problem is that Arduino send data on an ongoing basis and sometimes LabView can not cope with traffic and read some values "0".

Is it possible to wait for the data and solve this problem?

I joined my current vi.

Thank you much in advance.

AndreasSchnaas wrote:

Yes, the characters are 0-9 and - no. ' + 'or'. '. And bytes that vary.

Once again, thank you very much.

Given that you send ASCII characters, change your Arduino code to send a character to end of line (10 byte value) at the end of each transmission.  Your code is already configured to use it.  Then you need not use the bytes to the Port at all.  Suffice to say the VISA of reading to read a large number of bytes.  Playback stops when it finds the stop character (value 10).  Your code will get a lot easier from there.

Tags: NI Hardware

Similar Questions

  • Add data from serial Port in the indicator series front panel?

    Hello! Everyone,
    I'm new to LabVIEW but has prior programming experience.

    I have to develop a front for my camera and this is why I need LabVIEW, data comes from serial Port, so I started internet research / LabVIEW forums and found various tutorials by the help I am able to do the part Serial Communication, but has got stuck in one thing.

    Whenever data from serial Port, it gets displayed on the indicator chain but clears quickly, but I want some data comes it does not erase the old data and new data to add with the old data.

    I read the string concatenation will work in this case, but I am not able to use it.

    Please take a look at my VI attached to this mail.

    You must use a shift register to keep your story.

    I recommend you go to some of the tutorials available.  They will help you a lot to get off on a lot of things like that.

    Introduction of 3 hours
    Introduction of 6 hours
    Bases LabVEW
    Paced self-study for students
    Self Paced Training beginner to advanced, required SSP
    LabVIEW training Wiki
    OR learning
    Getting started with products OR

  • drivers for USB to serial port cable

    I am trying to install drivers for a USB cable to serial port on a HP Pavilion dv7 laptop (Windows 7) - I go through the download and when I plug the cable of the toolbar displays a sequence of installation but then an error of installation failed. I tried all sorts of updates and Windows says that it cannot verify the signature of the device.

    Would have been nice to know exactly what you had already tried :-)

    I do not know what adapter you are using, but I have a Trendnet TU-S9 that I use to connect my OBDII code reader to my PC, so I can save the CEL errors that I receive on different vehicles. I thought I had the drivers for it installed, but I have not (could not even find on a HARD drive). But I plugged it in just to see what happened. The message was that no local driver could be found, I wanted to try Windows Update? I said yes, and installed a "Prolific USB - to - Serial Comm Port (COM3)". Plugged the code reader, started the PC-Link software and here!, everything was good.

    You could try to uninstall anything that you have already installed, restart, then connect the adapter and see if you have the same success. I use Win7 HP x 86, but Vista should at least try to do the same thing, and who knows, it might work :-)

    SC Tom

  • Waiting for data spacific

    Hello

    I have been to

    CREATE or REPLACE TYPE event_msg_type () AS OBJECT
    name VARCHAR2 (10),
    current_status NUMBER (5),
    next_status NUMBER (5)
    );


    I need deque spacific data using DBMS_AQ.dequeue, which means, for example, I need to wait where name = 'hh '.

    BR

    You have a few options, I can think... more I'm sure:

    1. the use of the rules - so when a message is queued, the rule evaluates the content and correctly sets the consumer_name, then you could have a rule that a for name = "HH" and then put that, under the HH consumer_name - take a look on: http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/aq_admin.htm#sthref945

    2 DQ message by msg_id(2) - so ask the queue view, interrogatin field user_data for these messages matching your criteria get the msg_id(2) argument and use it to DQ them.

    I prefer option 1.

    HTH

    Thank you
    Paul

  • Waiting for data sheets

    Dear all brothers.

    I want a query to retrieve the data sheets for employees, as the start_date and end_date, leave_type arguments pending these things.

    Thank you in advance, I appreciate your help.

    Hello

    Hope under query allows to obtain information on pending leaves: -.

    Select Papf.employee_number 'No. Emp'
    , papf.full_name "name of the Emp.
    , hat.creation_date 'let applied '.
    ,(Select Fu.user_name from)
    Apps.fnd_user fu
    When user_id = hat.last_updated_by) "last approver.
    , decode (hat.status, 'E', 'pending approval', 'Error', ' there 'would be', 'Deleted', 'Other') 'current state '.
    , hat.item_key, 'key '.
    , hats.information1 'Absence Start Date.
    hats.information2 'Absence End Date'
    (by selecting paat.name in apps.per_absence_attendance_types PAAT
    where absence_attendance_type_id = hats.information5) Type "Absence".
    , hats.information6 "without category".
    hats.information9 'Status of Absence'
    of apps.hr_api_transactions hat
    apps.hr_api_transaction_steps hats
    apps.per_all_people_f women's wear
    where 1 = 1
    and papf.person_id = hat.selected_person_id
    and hat.transaction_id = hats.transaction_id
    and hat.status = 'Y '.

    Thank you
    Avinash

  • A time waiting for data acquisition

    What is the best way to increase the time of settling on measures Visual C++ of the PXI-6255 A to D? We needed to make some changes of material which gave rise to a measure by a voltage divider high resistance (24.7 k and 100 k) with secondary action on a voltage close to the ground. Switching between the two sources leads to images ghosts/crosstalk effects. We don't have a way to make changes to the material at present. Reduce the frequency of sampling is useful up to a point, after which the voltage reading is still low.

    I tried to use the daqmxsetswitchdevsettlingtime function, but have been unable to find documentation on the first parameter, char deviceName []. What is the name of device?

    If this function is deprecated, there's a replacement feature for this?

    Switching functions of NOR apply only for NI Switch hardware. What you want is to change the clock to convert to change the time channel inter.

    http://digital.NI.com/public.nsf/WebSearch/65E7445DB1AA5DC586256A410058697B?OpenDocument

  • Impossible to change the mode of the transceiver (4-wire 2-wire) for 485 USB serial port

    I'm trying to set up a USB-RS485 device, according to this knowledge base document:

    http://digital.NI.com/public.nsf/allkb/1D516C10D7EDFAC6862571110073B8F4

    However, all advanced under the port com series options are grayed out and is not possible to change the mode of the 4-wire 2-wire transmitter/receiver. How can I activate these?

    Thank you.

    On Windows Vista and later versions, these settings can only be changed in MAX as an administrator. Just right-click on the icon and choose 'Run as administrator' and everything should be made available to you.

  • Waiting for data

    OPERATING SYSTEM: AIX
    DB: 11g


    In a physical configuration of the standby database, I had to perform incomplete recovery to my primary database and because of that I had to open my primary database with resetlogs option.

    What should I do with the database of the previous day, I need to create another as the orde of my primary is reset with the LSN 1?

    Concerning

    When STANDBY_FILE_MANAGEMENT is set to manual on standby and you add a data file to the primary, then the data file is created in Eve DB under the $ORACLE_HOME/dbs location when the redo data is shipped from primary to standby mode. And finally, the MRP stops.
    You can check the link I gave in my previous post.

    If redo data are not delivered before primary and you do not get to see the data file newly added in the standby database using the view v$ datafile, then you will need to place the tablespace in primary DB in backup mode, copy the data from database pending file and update the controlfile ensures.

    Re: Lost datafile on Standby in Oracle 10g

    Kind regards
    Shivananda

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

  • Data NMEA which are received on the serial port, when the system starts causes windows 7 to interpret these data as a serial ballpoint mouse and moves the cursor jumping around.

    I know this question was asked several times before, but the solutions proposed, such as changin the registry does not help. It changes by itself. In the configuration that I have in my boat, the stream of NMEA data is directly injected into the COM port so no driver is necessary. It's a problem easily solved in windows XP, why is it so difficult in W7? There must be a way to permanently disable the plug-and-play driver load. I found this program that works only for Vista, if I understand correctly: http://www.stentec.com/en/download-freeware COM port plug & play blocker. If something similar could be provided by MS for W7, it would be very good...

    It turns out that the program at the port of Stentec COM (freeware) http://www.stentec.com/en/download-freeware care & play blocker, also works in W7. I don't know how it works, but it does, and it's good for me! It also works for the virtual serial ports.

  • GSS stuck "waiting for configuration data.

    One of my clients have 2 GSS 4900 running ver 4.1 (1)

    I can't get the ESG service works properly in a secondary gssm running. Gssm service looks like it starts but if I check "gss status" och "Show System State" that it is awaiting configuration data

    MNT - GSS - 002.nt.se #show - system status

    Standby GSS - 4.1 (1) GSSM - Cisco [Mar 12 Nov 16:10:21 UTC 2013]

    Recorded in primary GSSM: 10.16.0.15

    Component waiting for data routing configuration (wait a minute). [runmode = 3]

    START THE SERVER

    16:01 Config agent (crdirector)

    16:01 Config Server (crm)

    16:01 Database

    16:01 GUI Server (tomcat)

    16:01, Node Manager

    16:01 webserver (apache)

    Ping works fine between the GSS: are and there is no firewall involved (both are located on the same ip subnet).

    I did stop gss and then start gss. Waited for 24 hours, but the situation is the same.

    If I'm running tcpdump on the secondary, I see TCP traffic and UDP between the primary and the secondary, although all UDP packets have a warning of incorrect checksum.

    I have no idea on how to t-shoot, that. Should I do gss disable, remove this gss of the primary gssm and enable gss again in the secondary?

    Notice to lovers?

    Hello

    There seems to be a communication problem. You can do the following and see if the GSS is going to runmode = 5.

    On the standby: gss stop gss disable Then, go into the GUI of the GSSM and delete the standby GSS from the resources tab Then go to standby: gss enable gssm-standby x.x.x.x (IP of primary )

    Then in the GUI of primary GSSM, you will again see the standby in the resources tab. Click on it, and check on the activate button, then hit submit. Make sure the standby goes to runmode 5 under "gss status" output.

    If this doesn't work then you can try the below:

    Go to the GUI of the GSSM and delete the standby GSS from the resources tab. On the standby: gss stop restore-factory-defaults Make sure you have a console connection so you can do the initial config on the Standby GSS (add IP, etc). Once done, enter standby:

    gss enable gssm-standby x.x.x.x Then in the GUI of primary GSSM, you will again see the standby in the  resources tab.

    Click on it, and check on the activate button, then hit submit. Make sure the standby goes to runmode 5.

    Kind regards

    Kanwal

  • Questions about serial port read and write at the same time

    Hi I create a user interface for the communication serial port, where there are essentially 2 front panels, where the user enters commands one and the other where the prints of UART is delivered. I thought initially using a state machine but the reading and writing may be independent sometimes and so I can't rely on States. I searched a bit on the forum and he left me even more confused. Help, please.

    (1) in a thread that sessions visa duplicated has been used for writing and reading at the same time, is it recommendable? How will this affect performance?

    (2) essentially when the vi is reading data are it must constantly view as well, however, someone said that it takes too much memory to use shift registers, so how do I go about this? If using a State in queue after the loop of reading it affects the playback loop and be sequential?

    In addition anyway is to move the cursor to the latest data from the indicator

    (3) for the control of the user input, assumes that the user has entered an order in the control and press ENTER, then writing visa is launched, but if it comes in another string and press enter then write must be called again... is - it possible? will detect the previous commands in the control of compensation?

    (4) according to my understand the expectation for the event do not monopolize resources and writing can go in parallel, am I right?

    Thank you. I have attached a very basic vi which took me to the point, but I want to make it more robust. Please help especially in the part of the user interface.

    su_a,

    (1) you can have only one session to a port. Several UART can handle full duplex so performance is not affected.  At flow rates of high data and large amounts of data, buffering and latencies of BONE can become a problem.

    (2) who told you that shift registers using too much memory? Shift registers are usually the best way to transfer data from one iteration to another. String concatenation inside a loop (registry to offset or not) causes the chain to develop and may require re-allocation of memory.  Your VI never clears the string so its cold length become very large.

    Generally, you do not have an active cursor on an indicator.  If you want to always display the most recently received characters and turn on the vertical scroll bar use a property node to keep scrolls to the bottom.  This can be annoying for users if they attempt to manually move the scroll bar and find that the program continues to move it back automatically.

    (3) if the user has changed the value in the chain of command, when he hits enter the modified value event fires.  Simply strike brace does not change the value and does not trigger the event.  Not control need to be erased, but the value that he has to change.  If you want to send the same command again, have a button send a command may be a better choice.

    (4) write is a case of the event.  It is not in parallel with anything.  The structure of the event do not monopolize resources.  The other loop will run while it waits.

    The event loop will not stop when you press the STOP button. Probably it wll take two command: change events of value after JUDGMENT before any loop stops.  Replace the Timeout event (which never expires) with a STOP: value change event and a real wire of this judgment to the Terminal endpoint.  Remove the local variable.  Make mechanical locking when released.

    Lynn

  • reading photoplethysmograph waveform with serial port on PC using Labview

    Hello world

    I'm gaining time real Photoplethysmography waveform of serial port using Labview.I have managed to acquire data from serial port by using the following features:

    -Baud rate: 38400

    -data bits: 8

    -stopbit: 1

     

    -No parity bit

    -Time delay before reading the serial port: 10 ms (according to what was written in the manual that every 10 ms there is a frame in serial port)

    After the reading string will be converted to byte array to be able to extract the bytes associated with waveform (1 & 2 bytes in a frame) even for SOP2 (6 & 7)

    (what is read in serial port is in decimal and must be converted to hexadecimal based on what made the software of prodeuct for some result.that in the waveform properties, I chose the hexadecimal representation)

    Then, as mentioned in the manual, I associate these two values to draw the waveform.

    Although I used the filter band digital waveform of pulse but not significant pass that was seen (cutofffrequeny:10 high low cut-off frequency: 0.5).

    I have attached my program and result in front of Panel and manual for the sensor. The result is still far from what is supposed to be. I was wondering if you could help me and let me know your opinion on the program and the protocol used. I have to get the result as soon as possible. Please let me know if you need more information.

    Kind regards


  • Serial Port problems - carriage return and use as an executable file

    Hello

    I developed an application to send a few simple commands on the serial port and read the corresponding answers of a device that I am in communication with.  I have been using logical Port to watch the line TX of the serial port.

    By using the Visa configure Serial Port I set the stop character property allow true and used the hexadecimal value D trying to make the termination a carriage return characters.  When I sent the order, I'll send the cmd followed by Enter.  No matter if this property is set to true or the hexadecimal value is set to D for carriage return or line break is, the serial port would always send a line break.

    Then I got crafty and the string constant under normal display to hexadecimal display.  The ONLY way I could send a carriage return was manually putting 0x0D after ordering.  So my question is, why the Visa set up the Serial Port is not working correctly, and is there a better way to send a carriage return?

    My next issue is facing the construction of executable files.  I'm using LabVIEW 8.2 and wrote this program for another employee to use on his laptop computer.  I did install runtime Labview 8.2 and led to the executable that I generated.  I did-> the executable by clicking Tools build the executable.  The problem I noticed was that the executable would open and will work perfectly, but it would not send any data the serial port.  I then ran the executable on my laptop (which contains the full version of LabVIEW 8.2) and the serial port has worked well.  I guess my question is... Are there plug-ins that must be installed to use the serial port with the Labview runtime engine?  Or y at - it a step that I failed to do?

    Thank you

    Gary Still

    Not immerse in the first issue. The Knight will probably be galloping until shortly.

    For your second question, after building the executable, you must build the installer and includes support for the VISA. VISA is required for serial communication, and it does not accept American Express.

    It may be useful

    -AK2DM

  • p5u69ut: Serial Port PCI drivers

    Where can I find the drivers for the PCI Serial Port on this machine?  I loaded all the HP drivers for this macine after an upgrade to windows 7 Enterprise and this driver is not available.  Thank you

    Hello:

    You need this driver... install it manually if automatic installation method does not work.

    This package provides the driver Intel Management Engine components to support desktop models that are running a supported operating system.

    FTP://ftp.HP.com/pub/SoftPaq/sp75001-75500/sp75384.exe

Maybe you are looking for