Write command to trigger com port

i have a shimmer accelerometer(bluetooth). i need to use java to send data to the shimmer to trigger it to send data. when it send data, so that i can send it to the database. im using RXTX. can u help me??

Maby you should give this a try:
http://www.javabluetooth.org/
bye
TPD

Similar Messages

  • Write among COM ports in the same PC without cables

    How can I write to the memory address(es) of a serial COM port?  I would like to send data from one serial COM port to another in a manner similar to the that of the 'Simple Data Client' and 'Simple Data Server' vi examples.  This must sound strange since this is exactly what a null modem cable will do, externally.  I would like to eliminate the cable connection between COM ports that exsit in the same PC and communicate between them, internal to the PC, somehow. 
    Currently, I am using a LabVIEW vi to read a serial message on COM1, translate it, send the trsanslation out on COM2, so that a separate windows program (no .DLLs to interface with LabVIEW) can read the message on COM 3.  COM 2 and COM 3 are connected by a null-modem cable.  This requires three COM ports, and two serial cables.  I realize that I can use a physical loop-back jumper on COM2, for instance, where I send and read the translated message on COM2, but I still wonder if there is a method for doing this in memory, or something. Is there a way to accomplish the same objective with one cable (into COM1), no loop-back jumpers, and only two serial ports?  In summary, I want to read on COM 1, translate in LabVIEW, then write directly to another COM port, internally, without using a serial cable.  Can the 'IN PORT' or 'OUT PORT' vi's apply here?  Are these tools only for parallel ports?
    Hope this is not too confusing....  It seems like I am always trying to do something with LabVIEW that was not meant to be done....
    Thanks.

    Thank you.  If I pay the price they ask, this looks like it will create and share virtual COM ports - exactly what I need.  However, I would really like to find a way to do this in LabVIEW, such that I do not have to make my application dependent on another piece of third party software.  The 'Simple Data Client.vi' and 'Simple Data Server.vi', included in the shipset examples, seem to do this for TCP/ IP ports.  I wonder why the COM ports cannot be addressed at the memory level, in a similar manner???

  • Serial break on com port does not work

    hello everybody:
    i have the following problem:
    i am writing a command via the '"visa write" vi on the com port of my pc. in some cases the com port does not retun anything. that means that my "visa read" vi would timeout. the problem is that afterwards i need to send more commands but have to break the line in order to be able to do so. I have inserted the "visa break" vi but didn't get the reaction i expected. the line does not break. i tried to increase the break length but that does not work either.
    Any ideas?
    Using LabVIEW 2013
    Solved!
    Go to Solution.

    A break will not break the connection, it will just put a 1 to the Tx line for a periode longer than 11baud length (?) or specified time. 
    A hardware check that the break is send: connect a scope or a DMM to the TX and GND , a 500ms break should be clearly visible even on a 'slow' DMM. (a 10k resistor and two LED antiparrallel  or a handy RS232 minitester would do the same job )
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • BPM process archiving "Processing of archiving write command failed"

    Can someone help me with the following problem. After archiving a BPM proces, I get the following messages (summary):
    ERROR  Processing of archiving write command failed
    ERROR  Job "d5e2a9d9ea8111e081260000124596b3" could not be run as user"E61006".
    LOG -> Processing of archiving write command failed
    [EXCEPTION] com.sap.glx.arch.xml.XmlArchException: Cannot create archivable items from object
    Caused by: java.lang.ClassCastException: ...
    Configuration
    I've completed the following steps based on a blog item.
    1. created an archive user with the corresponding roles
    2. updated the destination DASdefault with the created user -> destination ping = OK
    3. created an archive store BPM_ARCH based on unix root folder
    4. created home path synchornization with home path /<sisid>/bpm_proc/ and archive store BPM_ARCH
    5. start process archiving from manage processes view.
    Process Archiving
    Manage Process -> Select a process from the table -> Archive button -> Start archiving by using the default settings.
    Archiving Monitor
    The following log is created which describe that the write command failed.
    Write phase log:
    [2011.09.29 12:00:18 CEST] INFO   Job bpm_proc_write (ID: d5e2a9d9ea8111e081260000124596b3, JMS ID: ID:124596B30000009D-000000000C08) started on Thu, 29 Sep 2011 12:00:18:133 CEST by scheduler: 5e11a5e0df3111decc2d00237d240438
    [2011.09.29 12:00:18 CEST] INFO   Start execution of job named: bpm_proc_write
    [2011.09.29 12:00:18 CEST] INFO   Job status: RUNNING
    [2011.09.29 12:00:18 CEST] ERROR  Processing of archiving write command failed
    [2011.09.29 12:00:18 CEST] INFO   Start processing of archiving write command ...
    Verify Indexes ...
    Archive XML schema ...
    Resident Policy for object selection is  instanceIds = [9ca38cb2343511e0849600269e82721e] ,  timePeriod = 1317290418551 ,  inError = false ,
    [2011.09.29 12:00:18 CEST] ERROR  Job "d5e2a9d9ea8111e081260000124596b3" could not be run as user"E61006".
    [2011.09.29 12:00:18 CEST] INFO   Job bpm_proc_write (ID: d5e2a9d9ea8111e081260000124596b3, JMS ID: ID:124596B30000009D-000000000C08) ended on Thu, 29 Sep 2011 12:00:18:984 CEST
    Log viewer
    The following message is created in the log viewer.
    Processing of archiving write command failed
    [EXCEPTION]
    com.sap.glx.arch.xml.XmlArchException: Cannot create archivable items from object
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.lang.ClassCastException: class com.sap.glx.arch.Archivable:sap.com/tcbpemarchear @[email protected]2@alive incompatible with interface com.sap.glx.util.id.UID:library:tcbpembaselib @[email protected]f@alive
    at com.sap.glx.arch.him.xml.JaxbTaskExtension.createJaxbObjects(JaxbTaskExtension.java:69)
    at com.sap.glx.arch.xml.JaxbSession.fillFromExtensions(JaxbSession.java:73)
    at com.sap.glx.arch.pm.xml.ArchProcessExtension.fillHimObjects(ArchProcessExtension.java:113)
    at com.sap.glx.arch.pm.xml.ArchProcessExtension.createArchObjectItem(ArchProcessExtension.java:60)
    at com.sap.glx.arch.xml.JaxbSession.createArchObjectItems(JaxbSession.java:39)
    at com.sap.glx.arch.xml.Marshaller.createItems(Marshaller.java:29)
    ... 61 more

    Hi Martin,
    I don't have a specific answer sorry, however I do recall seeing a number of OSS notes around BPM archiving whilst searching for a different issue last year - have you checked on there for anything relevant to your currnet version and SP level?  There were quite a few notes if memory serves me well!
    Regards,
    Gareth.

  • AT commands and Com port

    Connection to the com port is ok and i can send AT commands.
    But i need to make a few AT commands one after another. And i think i am getting errors..anyone can help?
                        outputStream.write("AT+CMGF=0\r".getBytes());
                        outputStream.write("AT+CMGS=153\r".getBytes());
                        outputStream.write(commandString1.getBytes());
                        outputStream.write("\u001a\r".getBytes()); // ctrl + Z
                        outputStream.write("AT+CMGS=153\r".getBytes());
                        outputStream.write(commandString2.getBytes());
                        outputStream.write("\u001a\r".getBytes());
    as u see there are 2 "at+cmgs=153" i guess this is where the problem lies...

    You must wait for the replies. I've not done this in java, but I have in VC++ and I remember that the Hayes AT commands are reversing half duplex. When you send a command read the incoming data until you see a carriage return.

  • How can I write to multiple daisy-chained network serial addresses through a single COM port?

    I have a VI to write to 3 PI Mercury motor controllers using daisy chained RS232 connected via a Prolific USB-to-Serial adapter. I know that it is possible to talk to the individual controllers because the PI terminal that I have recognises the addresses of multiple controllers and designates them Device 1,2,3. The VISA resource name when configuring the port just comes up as COM5 most of time, with seemingly no way to specify an address on that COM port. Occasionally the VISA resource is ASRL5::INSTR and as this is disconnected and re-connected, this address moves up a number (e.g ASRL7::INSTR). Can anybody tell me how I can configure my serial communication to allow me to individually communicate with the different devices through a single COM port?

    What does the manual say about addressing? RS-232 is not multidrop, the resource name is correct, and there is no additional configuration needed. There would have be a specific write in order to address a certain controller.

  • Need a gui to send simple ascii commands to com port

    I am not a programmer. Several years ago I took a class in Java. Now, I am looking for a gui with buttons that are programmed so that when clicked on with mouse a command (ascii or hex) will be sent to the com port. I am pretty sure that I don't want to read from the port. I have a table of commands that I want to match up to some buttons - a simple way of putting it.

    Before you embark on Swing and javax.comm, I'd encourage you to get up to speed with basic Java. A lot has changed in the past couple of years, and getting some practice with the basics will save you a great deal of frustration. Here are some recommended resources:
    Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
    Your First Cup of Java
    The Java� Tutorial - A practical guide for programmers
    The Java� Tutorial - Trail: Learning the Java Language
    New to Java Center
    Java Programming Notes - Fred Swartz
    How To Think Like A Computer Scientist
    Introduction to Computer Science using Java
    The Java Developers Almanac 1.4
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Books:
    The Java Programming Language - 4th Edition
    Head First Java, by Bert Bates and Kathy Sierra
    Thinking in Java (Free online), by Bruce Eckel
    Core Java, by Cay Horstmann and Gary Cornell
    Effective Java, by Joshua Bloch
    Let us know if you have specific questions. Good luck!

  • I want to write onto port 3 based(using a buffer) on a pattern match trigger from port 2. How can I code this?

    I have to check for a pattern match from port 2 and based on this trigger I have to write onto port 3(buffered) as fast as possible. So there needs to be a buffered O/P from port 3. How to code such that the pattern match trigger from port 2 triggers the trigger config.vi for port 3?

    Bheem,
    Unfortunately, you can not share the start trigger with another operation when using the pattern match operation as a trigger. The only way to share a start trigger is if you are triggering on the rising or falling edge of a digital signal. This is a limitation of using the pattern match operation as a start trigger.
    Regards,
    Todd D.
    NI Applications Engineer

  • Commands to FTDI virtual COM port via NI VISA interfere with communication with FTDI chip using D2XX drivers

    Hello!  
    I am trying to communicate with a DLP Design module DLP-USB1232H which uses an FTDI chip.  My program uses the D2XX drivers.  It works, but...
    In another program that runs at the same time, I'm communicating with another instrument via a virtual COM port (VCP) that uses an FTDI UART.  In this program, I use the VISA Serial Port functions.  It works, too, but...
    The first program has the capability of listing all the FTDI devices in the system prior to choosing the right one to communicate with.  When the VCP is plugged in, it lists it (FT232R USB UART) along with the DLP-USB1232H and communication with the latter device works.   But as soon as the second program sends a command through the VCP, the first program no longer "sees" any FTDI device.  It stops working.
    I have tried 2 different FTDI VCPs; one a standalone cable and the other built in to the instrument.
    I’m using Windows 7 32-bit.  My programs are both LabVIEW 8.5 executables. 
    Is VISA "taking over" the channel to the DLP-USB1232H?  Does someone who understands NI's implementation of VISA have any ideas on why VISA is doing this?  Or if something else is going on?
    I'm also interested in workaround ideas.  I've tried a "Prolific" VCP, but most drivers don't work and the one that doesn't give an error in Device Manager doesn't communicate with the instrument.  
    Cheers
    Halden
    Solved!
    Go to Solution.

    Halden,
    It really sounds like you have a resource conflict. That occurs when two programs or parts of programs try to use the same device or port at the same time.  Your Get Device Function probably tries to open a session with each port (as you increment the index). When it hits a port which is being used by the other driver, it cannot open the session and stops working? Have you examined the errors returned by each program? The VISA drivers will return an error when the port is in use.  I do not know about your program or drivers, but I would expect some kind of error.  Automatic error handling in LabVIEW will not catch errors from a driver if it does not translate them to LV error clusters. So do not count on automatic error handling, if you use it, to display all possible errors.
    Lynn

  • Can the Com port on the EX90 be connecting to an AMX NI700 to receive command?

    if so, what are the pinouts for the EX90? (TX/RX/GND) The AMX uses pin 3 for TX, Pin 2 for RX and Pin 5 for GND. I have been using an RJ45 cable and trying to match pins but I am still not getting a TX signal. Also, does the COM port need to be enabled?

    The EX90 is not really build to be controlled by an additional control system.
    (in general thats a thing for the integrator prodcucts).
    The Serial port is not a RS232 (+/-25 Volt), instead of their using TTL level.
    So a direct connection without a proper cable might cause a hardware fault!
    I think the serial port was on by default, but that might have changed on the current software versions, thats what works fine for me:
    xconf // serial
    *c xConfiguration SerialPort BaudRate: 38400
    *c xConfiguration SerialPort LoginRequired: Off
    *c xConfiguration SerialPort Mode: On
    The serial port is also on the bottom of the device, its ok to use it if you need to
    troubleshoot boot issues, but besides that not really usable.
    Dont expect Cisco to do any support for this if you run in to strange behavior when
    controling the system with a 3rd party control.
    Btw, what I would strongly recommenced is to use the telnet/ssh cli or http(s) API.
    could picture that this might work with the AMX700, so why even think of using a serial port, ...

  • How to use shared variables to address multiple Watlow controller​s on the same COM port

    Hello,
    I am trying to use LabVIEW 2010 to control 4 Watlow temperature controllers on one COM port. 3 are Model 96 and 1 is an EZ zone controller. Each controller has a unique modbus address, and I am trying to read from and write to individual registers (such as closed loop setpoint) using shared variables. I am getting return data when reading (although the data appears to be invalid), but am unable to change the value in the register by writing. How can I be sure that the Modbus server is sending commands to the correct controller?
    Chuck
    Solved!
    Go to Solution.

    Peter,
    Thanks for the reply. I have actually solved that problem. I realized that the Modbus server address has to be the same as the controller's Modbus address.
    I have, however, run into another problem. Perhaps you could help me with that. I have a system with 4 Watlow controllers, 3 are series 96 controllers, one is PID only and 2 are ramping. The 4th controller is an EZ zone. I am using RS485 for communications and the controllers are all wired in parallel for communications and power.
    I have set up 2 Modbus servers for 2 of the controllers.
    This is the first I have ever worked with Modbus based communications. I have successfully programmed using the Modbus read/write VIs, and am wanting to move to shared variables. My questions right now revolve around addressing, Modbus I/O servers and COM ports. Specifically, at this point, I know the addresses need to match up between the server and the slave device (Watlow controller in my case), how many servers can I create and use on one COM port? If the number is limited, is there a way I can specify an address that I want the server to talk to? Will the broadcast mode work to request data values from the controllers?
    I'd appreciate any information you can help me with, or if you could point me to some sort of concise 'How-To' for Modbus communication.
    Thanks.
    Chuck

  • I/O error with COM port

    I have a RS485 line going into COM5 of my PC. Using HyperTerminal, I can talk to my serial device. However, there are problems with LabVIEW VISA functions. I can open the connection. I/O errors were given when I try to read or write. Is this because LabVIEW does not support RS485? What can cause the I/O error? Thanks.

    Some tips,
    First off, computer com ports are only RS-232. Make sure you are using the RS-232 port on the
    ADAM-4570. Do you have to configure this port as RS-232 with Advantech software? If the ADAM is
    configured as RS-485, you won't be able to talk to it without an RS-232 to RS-485 converter. Stick
    with RS-232.
    Secondly, make sure you have shut down all other software that is using COM5. Only one application
    can use the port at a time and sometimes other applications don't release the port properly.
    If HyperTerminal can talk to the ADAM, then everything is configured properly for a LabVIEW app. Be
    sure to put a carriage return at the end of the command to the ADAM. HyperTerm does this
    automatically, LabVIEW doesn't. Start with the basi
    c commands you used with HyperTerminal.
    "sy" wrote in message news:[email protected]..
    > Good question. In fact, I think the problem stems from how COM5 is
    > mapped to my PC. As for the second question, I got the same I/O error
    > when using MAX. I believe that there is a conflict between NI
    > software and the software I use to map the RS485 line to COM5.
    >
    > I am using Advantech's ADAM 4570 module to convert a RS485 line to
    > ethernet. The ethernet cable goes into the PC. A software utility is
    > used to map the ethernet connection to COM5. It is conflict between
    > this utility and NI. Any idea on how to resolve the conflict? Thank
    > you.

  • Using VISA and RS232 devise , loosing the COM port .

    Using VISA and R232 devise communicating fine with labview and I can  Read and Write.
    however, I want to turn OFF the devise, then turn it ON again (part of the test), and be able to continue .
    The COM port is not communicating . unless I turn both the devise off  and Exit  LV then restart again.
    How to do that without restarting LV.
    thanks

    " Is there a better way to make sure its closed and driver is not hanging onto the connection? "
    you could try a command like " devcon disable usb\vid_0CD5*0003~" and then "devcon enable usb\vid_0CD5*0003~"
    ( you will need to figure out the ID of your device, my example is for a LabJack U3. )
    Get the devcon.exe-utility from microsoft.
    but as mentioned before, just watch what happens with device Manager (' run devmgmt.msc')...
    to enable/disable a device in a VBS script you can use below example,   (As Administrator!)
    Option explicit
    Dim oShell
    set oShell= Wscript.CreateObject("WScript.Shell")
    oShell.Run "RunAs /user:Domain\USER ""cmd"
    WScript.Sleep 100
    oShell.Sendkeys "USERPASSW"
    WScript.Sleep 500
    oShell.Sendkeys "devcon disable usb\vid_0CD5*0003~"
    WScript.Sleep 1000
    WScript.Sleep 100
    oShell.Sendkeys "devcon enable usb\vid_0CD5*0003~"
    WScript.Sleep 1000
    oShell.Sendkeys "exit~"
    Wscript.Quit
    My reason for doing it this way is that my USB device didn't respond to any of my calls from Labview. Enable/Disable solved the issue...
    The thing I particularly hate about above VBS-script is that I need to send the Admin password in plain text...

  • HyperTerminal sees a COM port but VISA does not

    It should not be possible that HyperTerminal sees a COM port but VISA does not. Does anyone know why or have any ideas?
    Here's some more info: I wrote a LabView (LV) program and deployed it (via the Application Builder) to some of our production department's PCs (some Windows XP and some Windows 7). We use it to set up products we design and manufacture through our device's USB serial port. The USB port is actually a virtual COM port (VCP) - a USB to Serial converter or "bridge". We have a custom driver for our device and since each device's USB bridge chip is programmed with a different serial number, every time we connect a new device to the PC the installer runs and assigns a new COM port number. This is so our customers can use multiple devices on a PC. Fine. On one of our production PC's we were close to  COM900 ports (HyperTerminal sees only up to COM256) when suddenly Win7 would not allow any more. We were able to uninstall orphaned (non-present) COM ports from DeviceManager ("DM") by starting it from a command console (DOS window) with a special command-line switch, "set devmgr_show_nonpresent_devices=1" then "start devmgmt.msc" (I have this in a batch file). In DM View menu you can "Show hidden devices" and uninstall them as if they were connected. I've also tried uninstalling them the normal way when the device was actually connected. Either way, sometimes, not always, depending on the COM port number, after reusing that port number by installing a new device which picks up that old, freed-up number, LV VISA doesn't see it. In other words, when "Refresh" is clicked in the COM port VISA list box, any new devices installed should be and normally are seen. (Refresh is not needed if the application is started after the device's driver is installed. It is only need if the LV application is open with the new device is added.) However, HyperTerminal does see it and lists it in the Properties screen, the "Connect using..." list box. And the port works with HyperTerminal. (Of course we've tried rebooting after uninstalling and/or reinstalling the device, with the same results.)
    When I've spoken to the NI Applications Engineers in the past about serial port issues (not about this problem) they have confirmed that if HyperTerminal can see the port then NI VISA should also see it. This is crazy. I am posting this in hope that someone can shed some light on this problem.
    Thank you. -Ed

    Good catch. Yes, we're using the Silicon Labs CP2102 and have created a "custom driver" installation package. Our new PCBs have a factory-programmed chip, so the PC reuses that COM port (COM3 on that PC). The problem is when we we re-program the CP2102 (setIDs exe) with our PID, and device strings (including the S/N), the PC runs our installer and assigns the next COM port number. I was hoping that maybe it would go up to 64K or something! Anyway, it surpassed COM256 but we ran into this problem when almost up to COM900.)
    There is a registry entry for each SN device, which shows the assigned port. If we delete the key with regedit, the COM port database (don't know the file name) still has the port number. That's where Device Manager comes in. It seems to allow us to manually delete the ports, but it would take quite a while to delete 900. (I was trying to make a batch file for DevCon, but couldn't get it to see the HW ID of the devices in need of deletion.) So we tried manually deleting a few. After doing that Device Manager shows that Windows (and HyperTerminal) can reuse the port number when a new device (new SN) is installed, but, as you know from this post, VISA cannot see unless I manually add it in MAX.
    I can't see how it has anything to do with the Silicon Labs driver. I might have to delete ALL of MY devices, then uninstall the driver files, reboot, then reinstall, as you suggested with the SiLabs driver. However, I don't see how VISA will now see these changes. VISA must have it's own database. That's what I thought deleting the ports in MAX would clear out, like a fresh install, but apparently not.
    I've been through Silicon Labs' tech support on other issues and they've been able to help on some. I could run this by them.
    BTW, have you noticed that Silicon Labs' chip and driver, while faster than NI's own "bridge" or serial-USB converter (I returned it because at $100 it's performance was worse than a $20 converter you can buy in Staples), is substantially slower than a real serial port? For example, our device can transmit 250 readings per second (a 12 byte string). A real serial port used with my LabView program can keep up, i.e.., graph & tabulate at that rate, but with a VCP we only get about 70 RPS. Same code. Can't figure this one out. They say the've tested the driver to 900 KB claimed. We're using 115KB here. Anyway, the VCP driver makes it look like a COM port which LV thinks it is. Why is it slower than a real port when the USB should be able to work almost 10 times faster than I'm using it (up to 1024 bytes per mSec per the full-speed USB spec, which SiLabs claims they verified)?
    Anyway, I appreciate your help. Thanks! -Ed

  • Write command could not be executed

    Hello,
    I'm back again with a new error that I can't seem to figure
    out. Any help would be greatly appreciated.
    Error Occurred While Processing Request
    Error: WRITE command could not be executed
    write
    E:\Websites\thriftypockets\wwwroot\coupon\photos\generated\105436.gif
    The error occurred in
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 293
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 290
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 34
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\cpncreate.cfm:
    line 1
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon_preview.cfm:
    line 26
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon.cfm:
    line 767
    Called from
    E:\Websites\thriftypockets.com\wwwroot\coupon\admin\coupon.cfm:
    line 1
    291 : <cfx_image action="IML"
    292 : file="NEW"
    293 : x="590"
    294 : y="239"
    295 : commands="
    Thanks in advance

    There are guesses, but I would check:
    1. Does the target directory exist?
    2. Does the CF application server account does not have
    rights to access directory?

Maybe you are looking for