Cannot sync to the device via the serial port

I have to read the data with a DSP associated with an EKG. For this I need 5 bytes (0x00 0x80 0x00 0x80 0x00) in a specific order that are sent through the port every second. I followed the data sent via the port and these 5 bytes are actually get received, however I havnt managed to find with my VI. I tried many different ideas without success and maybe Im doing something wrong. My latest attempt uses a waiting on event so I won't miss all the data. Ideas? See what I'm missing?
I'd appreciate any help!

I think you are using the wrong function.  You use Match true/false String.  Said context-sensitive help "examine beginning of string to see if it matches the true or false string. This function returns a Boolean TRUE or FALSE value in the selection, depending on whether the string is true or false string. "Well, suppose that the string isn't everything at the beginning, but as another byte in front of her?  It will not find the search for string.  And the wiring of the same search in True and False are strange because if it is found, then it is both true and false at the same time.

You should use search and replace or search/Split string to determine if and where the search string is inside the largest chain.  (I would take research/Split).  If the string is not found it returns-1, otherwise it returns the location of the string.  And it has the advantage of any return after the game you could feed in the shift register for a search on the next iteration.

Tags: NI Software

Similar Questions

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

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

  • How to connect Agilent 8163 b via the serial port

    I have a problem connecting to the serial port with Agilent 8163 b. The driver that I use is driver_vxipnp_816x_4_1_4.exe. The problem always message display "Visa resource not found. Check the HPIB-Bus address"when I use the components inside the"hp816x tree.vi ". However, I have no error if I use normal read and write VISA.

    Y does it can someone help me answer my question? Thanks in advance.

    Thanks for the reply.

    I face a problem that you use with GPIB-USB-HS due to the physical dimension, as shown. The width between the remote locking connector (FIR) and (w1) GPIB connector to the appliance is too small for the GPIB-USB-HS (w2) connect to this topic. If I unplug the connector RIL, tunable Laser will not be activated. So I have a few questions as follows.

    1. the LabView can always activate the tunable Laser if I unplug the connector at RISK in my case via GPIB?

    2. the LabView is compatible with GPIB connector (model x 10833) Agilent?

    3. is there a way to solve the problem posed by the RIL connector unplugged?

    The drop box

    P/S: version please is 4.84 to 8163 b.

    Thanks for the help and I'm too new in this field.

  • Outlook Express cannot send and receive emails and cannot sync to the phone.

    Hello

    I'm a Microsoft Online Customer Service, which contacts on behalf of my client. My client has problem with Outlook Express, which cannot send and receive emails, and cannot sync to the phone. He receives this error message below:

    The host 'SMTP' could not be found. Please check that you have entered the server name correctly. Account: 'POP3', server: 'SMTP', Protocol: SMTP, Port: 25, secure (SSL): no, Socket error: 11001, error number: 0x800CCC0D

    I'm not sure of the sync with the phone number, but the account settings are not yet near. SMTP is not a host name or a server name. You must find the correct POP3 server settings.

    Setting up email in Outlook Express servers
    http://www.Microsoft.com/Windows/IE/community/columns/mailserver.mspx

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

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

  • The VI "VISA set up the Serial Port" will only work at 9600 baud

    I wrote a Serial Port RS232 RW.vi monitor of ' "which works for most. The problem is that it will not meet the alternative port configuration settings... For example: the default RS232 serial port configuration is:

    (COM1, 9600 baud, 8 data bits, 1 stop bit, no without parity)

    As a test, I use a Null Modem cable to connect to my LabView Com1 port to another PC running RealTerm Serial Port Monitor... Using my "RW.vi RS232' newly designed with the port settings of (COM1, 9600 baud, 8 data bits, 1 stop bit, no without parity), I can send and cannot receive data back throughout the day no problem...

    However, if I configure the port "RW.vi RS232" all other configurations, such as (COM1, 2400 baud, 7 data, 1 stop bit, odd parity bits)... He will not take the expected risks and continues to operate @ 9600 baud rate etc.

    Then, I changed the settings default "RS232 RW.vi" (2400,7,1, Odd)

    He still refuses to derogate (COM1, 9600,8,1, no...)

    I also went in the Device Manager of Win XP on the system of LabView and configured manually Com1 2400,7,1, Odd

    and yet,... work at the "RS232 RW.vi" @ 9600,8,1, none

    Everyone can test my VI in the car and see if they have the same problem of not being able to see the new changes in the Port configuration settings... other than (COM1, 9600,8,1, no...)...?

    FYI... Unfortunately my LabView runs on Version 6.0, you may need to up-conversion of the attached vi

    Instead of simply appreciate the comments, you need to implement.

    Having closed VISA inside the loop is definitely the problem.  And Crossrulz is 100% correct about the problem being that the serial port gets zero to default baud rate after the closure of the port.  Here's the proof.

    Note that while may have set the port settings manually in the Device Manager, these parameters are reviewed by the pilot VISA.  If you look in the measurement and Automation Explorer under devices and Interfaces > serial and Parallel, you'll see the default settings using the VISA driver.  If you change this setting, your program will work as desired.  But this is not the appropriate fix.  The correct solution is to get the VISA close out of the while loop.

    The port settings are established in this order.

    1. by Windows device drivers.

    2. by the VISA driver as set in MAX.  Since you are using VISA, these settings will be automatically replace #1.

    3. by the port settings, you set programmatically in your LabVIEW program.

  • Smartphones blackBerry how to connect the serial port (SSP) to a PC?

    I try to connect my BB (8310) to my pc using the port profile series bluetooth with my old phone (sony ericsson w300i) would just pair the phone with the pc and then the pc would discover services on my phone and I woluld double clicking the port icon series, but when I explore the services BB I only have handsfree and dial-up networking , I know the phone supports the serial port because I checked in the bluetooth options, and it supports the connection to the serial port.

    Thank you.

    http://www.BlackBerry.com/BTSC/search.do?cmd=displayKC&docType=kc&externalId=KB04132&sliceId=1&docTy...

    proceed as if you want to sync via bluetooth

    If you just want to transfer files, stop after completing step 5

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

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

  • How to convert string data from the serial port to double?

    Hello!

    I am very new in LabView and attempt to read data from an OHAUS pioneer pa-313 electronic scale via RS232 serial port. I use the VISA. I can read the data and see it as a string to the screen, but when I try to convert it to a double, it is just the integer and decimal numbers have disappeared. Here's the question: what can be the problem? How can I get the decimals as well?

    What is your normal decimal point?. or?

  • 2 ways to send 16-bit to the serial port. What is the good?

    I am trying to send data via a serial port... This data consists of a 16-bit format. The data are sent by a DSP. Searching in the internet I found two ways to send data. The first is that the first photo anda the second way is the second picture.  I read data ok, which in this case is a sine wave. But I 'don't know if it is correct or not.

    In the first case , the citation read buffer sende th 8-bit to decimate them VI that will be concatenated after to join numbers function...

    Is it fair or not?   Second question. I noticed when I put multiples of 8 in the number of bytes the graph is ok. But when the number is not a multiple is the graph 'missing pieces '.  Why?

    In the second case, I confess I didn't undertood it. I know that the CASTING of TYPE function transforms the string on a table swap bytes (DSP sends the MSB and LSB) I know what subset of string.  I read that the 4 in the offset is put there to avoid the reading of the data header. But I don't know why 2048 is here. The latter reads data too...

    With any who answer my questions would be a really really help

    Thank you guys.

    First case

    second case

    Both are probably correct for the data being sent.

    If you want to read a unique 16-bit value at a time, then obviously you would set the number of bytes to read to be 2. The following code shows two ways to convert the two bytes to a single value. The chain Unflatten to specify the boutien.

    You don't mention her, but how do you synchronize the data. With the dsp to send two separate bytes, not sure what byte you will read first. Do you send start/stop characters so that you know this vital information?

  • read the serial port management using the SRM Protocol

    Hello

    I have a gas analyzer that communicates with the PC via the serial port.

    This is the "Industrial VarioPlus SRM".

    I have attached a PDF file that describes the communication protocol.

    I'm trying to decode the data that are sent from the parser, but I can't do it.

    I have attached the vi in which I made some effort.

    Any help is appreciated, at least for a single value in the data stream.

    Thank you.


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

  • NullPointerException when getting the serial port.

    Hello

    I use the comm.jar to get the serial port, but failed.

    Error log:
    java.lang.NullPointerException: name cannot be null
    at java.io.FilePermission.init(FilePermission.java:171)
    to java.io.FilePermission. < init > (FilePermission.java:249)
    at java.lang.SecurityManager.checkDelete(SecurityManager.java:990)
    at javax.comm.CommPortIdentifier.getPortIdentifiers(CommPortIdentifier.java:24)

    I check the code in comm.jar.

    public static enumeration getPortIdentifiers()
    {
    SecurityManager securitymanager = System.getSecurityManager ();
    If (securitymanager! = null)
    securitymanager.checkDelete (propfilename);
    return new CommPortEnumerator();
    }

    Because securitymanager is not null, call checkDelete (propfilename). If securitymanager is null, all is well.

    Issues related to the:
    1. What is the function of the SecurityManager here, is the default value of null?
    2.i put the comm.jar in my class path, see also the win32com.dll file. But what is the cause of the error?

    Thanks in advance!

    Duplicate of NullPointerException when getting sΘrie

    Please post questions only once. It is impolite to post several times.

Maybe you are looking for

  • enable java script in my browser

    I try to activate the java script so that I can access many sites such as my site Web of the College, the adobe Web site. I tried to follow the instructions on the Mozilla support forum, but I don't see java script in my plugins. It's desperate! I wo

  • Recovery of the Internet and the Touchpad does not

    Hi all! I tried to format my Macbook Pro (2015 start, 13 "), so I wiped the disk with disk utility. Now, I'm the restart with CMD - R and a globe appears. I know that it means that the computer is trying to reboot from the internet, but I have to cho

  • Custom FPGA VI with CAN Interface

    Hallo, ICH habe ein Simulink Modell mit einer CAN Schnittstelle, habe dieses Modell in eine. OUT kompiliert Datei, and use SIT 2009 auf RT cRIO-9014 (mit dem NI CAN Modul 9853) reports vom host PC die das Modell einzuspeisen. FPGA durch und ein entsp

  • Installation of an earlier Version of Microsoft Visual C++ 2005

    I am getting SideBySide errors in the event log when you run an earlier version of Office. This is one of the errors: Solves the that partial assembly failed for Microsoft.VC80.MFCLOC. Reference error message: the referenced assembly is not installed

  • Microsoft Mail in Vista, no program associated to the setting of the power point

    With Microsoft Mail in Vista, open an attachment says PowerPoint there not associated program to open. However the Powerpoint Viewer is associated with and is used to open a .ppt outside Microsoft Mail. Why MS Mail does not know this association?