Send a single command to LTP Port

Hello,
I am still some what new to java. I have been looking and looking for a way to simply send the hex code 07 to my LPT port. When reading the documents provided by with the printer there is a simple way to it in doss. type "echo (press control+G) > LTP1".
Is there any way i can do the same thing but through java.

You can use the methods of ProcessBuilder (preferably) or Runtime classes to execute a command like that in Windows' cmd window. Make sure that the command works from the cmd window, first. Read about how to use the methods of these 2 classes in the Java API documentation. It can be read or downloaded from Sun's JDK download page.
Or, youu could install the RXTX package and use that.

Similar Messages

  • To send multiple operation commands to serial port

    My AC power source is able to communicate to PC via serial port using LABView and I can perform any operation by giving commands in Hex individually, But when it comes to the parallel operation of all the commands or to put them in a particular sequence. I am failing to do so.

    You can only send 1 command at a time.  That is just bus communications 101.  But you can string together many VISA Writes to send the individual commands, one after the other.
    But since if sounds like you are doing this on a GUI based instance, what you want to do is configure the port before your loop and close the port after the loop.  Then inside your loop you just have an Event Structure to key off of the different controls changing values.  You just send the command you need to inside of each event case.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

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

  • Want to use dotNet with teststand, but unsure how to send commands through serial port

    I have a loCom communication dll used to send and recieve commands through serial comunication for a particular product.  I the past they have used a LabVIEW wrapper to send and recieve commands, using this particular dll.  I would like to just use testStand for the DOTNET Dll.  I can get the commands, know the inputs and outputs required, however I can not figure out how to send the commands to the serial port.  Anyone have any exprience doing this in TesSTand?

    hallawt,
    With your .NET code module, you should be able to call it directly, most likely as a parameter in the .NET method.
    What are the inputs for the method you're trying to use?
    Also, could you clarify where you're starting to have problems in your project?
    Regards,
    Renée M
    Applications Engineer
    National Instruments

  • Esc Command to serial Port

    I'd like to send an esc command to the serial port in my LV-application. how I can do that ??
    I tried to use write to serial port and \1b as string but it not worked.
    In a terminal programm it works with the ESC key and with ALT+027.

    Hi,
    You have to be careful with the kind of datas that you send...
    You told that you sent \1b or something like this, but did you sent this in Ascii mode or \ mode... It's very different for the device...
    Maybe you have to write as a constant in \ mode the code \1b, and after that convert this string type to ascii mode using the roght button on the constant and then send the character to the device

  • Is there now a system call to send pass-through commands to ATA devices?

    I want to send pass-through ATA commands to SATA/ATA devices on intel-based solaris. From the beginning the USCSICMD ioctl has worked just fine on SCSI/SAS/FC targets on intel & sparc-based solaris, but the mechanism to send pass-through commands to ATA devices has always been undocumented, closed, unavailable, whatever.
    Is there now a way to do this w/o writing a custom device driver? Does anybody have an example chunk of code that does something simple like send the ATA IDENTIFY command to a disk drive? I know I can use SATL to encapsulate commands to SATA disks using certain SAS controllers, but I really need a way that will work with devices that are plugged into a standard SATA port on a motherboard.
    Thanks

    Hi Dhalek,
    Just tried out a small example and it works ok in SQL Dev 4
    drop table t1;
    create table t1 (col1 int);
    insert into t1 values (1);
    insert into t1 values (2);
    insert into t1 values (3);
    select * from t1;
    /*sqldev:stmt*/BEGIN;
    DELETE FROM t1;
    SELECT * FROM t1;
    /*sqldev:stmt*/ROLLBACK;
    SELECT * FROM t1;
    ---- RESULT ----
    table T1 dropped.
    table T1 created.
    1 rows inserted.
    1 rows inserted.
    1 rows inserted.
    col1      
    1         
    2         
    3         
    /*sqldev:stmt*/BEGIN
    3 rows deleted.
    col1      
    /*sqldev:stmt*/ROLLBACK
    col1      
    1         
    2         
    3        
    Regards,
    Dermot
    SQL Developer Team

  • Send email using command line

    Hi all,
    I was looking for a command to send emails but couldn't find proper setup to do so. What I'm trying to achieve is to be able to send emails from a workstation using command line. I do not run any mail server so i will have to use my ISP email servers.
    Can somebody provide some help on how to do this?

    when i try this:
    mail -s test_terminal myemailaddress
    i get the email but mail.log shows following entries
    Feb 4 17:50:21 iMacG5 postfix/master[1203]: daemon started -- version 2.1.5
    Feb 4 17:50:22 iMacG5 postfix/pickup[1204]: C528054663D: uid=501 from=<local_username>
    Feb 4 17:50:22 iMacG5 postfix/cleanup[1205]: C528054663D: message-id=<[email protected]>
    Feb 4 17:50:23 iMacG5 postfix/qmgr[1207]: 32F30546609: from=<[email protected]>, size=336, nrcpt=1 (queue active)
    Feb 4 17:50:23 iMacG5 postfix/qmgr[1207]: 32F30546609: removed
    Feb 4 17:50:23 iMacG5 postfix/qmgr[1207]: 48552546502: from=<[email protected]>, size=315, nrcpt=1 (queue active)
    Feb 4 17:50:23 iMacG5 postfix/qmgr[1207]: C528054663D: from=<[email protected]>, size=336, nrcpt=1 (queue active)
    Feb 4 17:50:53 iMacG5 postfix/smtp[1209]: connect to mx1.myISP.com[IP.add.res.s]: Operation timed out (port 25)
    Feb 4 17:50:53 iMacG5 postfix/smtp[1208]: connect to mx1.myISP.com[IP.add.res.s]: Operation timed out (port 25)
    Feb 4 17:51:21 iMacG5 postfix/master[1203]: master exit time has arrived
    Feb 4 17:51:23 iMacG5 postfix/smtp[1209]: connect to mx1.myISP.com[IP.add.res.s]: Operation timed out (port 25)
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: connect to mx1.myISP.com[IP.add.res.s]: Operation timed out (port 25)
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: warning: 48552546502: trace service failure
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: warning: 48552546502: defer service failure
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: 48552546502: to=<myemailaddress>, relay=mx2.myISP.com[IP.add.res.s2], delay=1213, status=deferred (48552546502: trace service failed)
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: warning: 48552546502: trace service failure
    Feb 4 17:51:23 iMacG5 postfix/smtp[1208]: warning: 48552546502: trace service failure
    Feb 4 17:51:53 iMacG5 postfix/smtp[1209]: connect to mx2.myISP.com[IP.add.res.s2]: Operation timed out (port 25)
    Feb 4 17:51:53 iMacG5 postfix/smtp[1209]: C528054663D: to=<myemailaddress>, relay=mx2.myISP.com[IP.add.res.s], delay=92, status=sent (250 ok dirdel)
    I was really surprised to get the email since my ISP requires authentication to send emails and it's using port 587.

  • Fatal Error Acrobat failed to send a DDE command

    Hello all.  I have a fillable form I developed using word 2010.  I am trying to convert it to a PDF form.  I open acrobat and select star from wizard from the Forms menu.  I browse to find the word document and open it.  I save the PDF document and everything looks good.  I get a progress bar that says "Please wait, reading Adobe PDF".  This is very slow progress and then I get the Fatal Error message "Acrobat Failed to send a DDE command".  I click ok and the progress bar continues still very slowly.  I get the same message again.  I click ok and the progress bar continues.  The progress bar gets to the end and just stays there.  Nothing happens.  I waited for an hour and then cancelled it. When clicked cancel, the PDF document opens with my form but without any fillable fields or drop down menus.  I tried to do it again a few times and I get the same error message.   I am using Adobe Acrobat 9 pro version 9.4.2.  Thank you in advance for your help.
    Gonzalo
     

    AA 9 will not work for anything but the print function from WORD 2010. The only version of Acrobat that is compatible with OFFICE 2010 for PDF Maker is AA X. Thus, open WORD and print to the Adobe PDF printer. Then open the pdf in Acrobat. Go to FORMS>Add or Edit fields. Since you have no fields at present, Acrobat will ask if you would like to detect form fields. Answer yes and you will get a first cut at the form fields. Yes, you will likely have to add some more and change the ones that Acrobat estimates, but you are on your way.
    The other two options you have is to go back to WORD 2007 or earlier or upgrade to AA X (or find someone with AA X and WORD 2010). These methods are pretty much your options with the software combination that you have.

  • How can I send multiple string commands into a VISA write?

    Hi Fellow LabVIEW users
    I am very new to LabVIEW (2.5 months) so please forgive me if my lingo is not up to par.
    How can I send multiple string commands to a VISA write. For example each string command looks like this
    1) 3A00 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0033 (Scenario 1)
    2) 3A01 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0034 (Scenario 2)
    3) 3A01 0000 0000 33FF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0067 (Scenario 3).
    and so on and so forth. And there are a number of scenarios.
    Each String scenario will give a different string output which will be interpreted differently in the front panel.
    Right now I have to manually change the string commands on the front panel to give me the desired output. How can I do this without manually changing the commands i.e. hard coding each scenario into the block diagram?
    Thanks, any feedback will help.
    mhaque

    Please stick to your original post.

  • Problem sending/ receiveing SMS on a particular port in an intercarrier n/w

    I am using JSR 120 to send & receive SMS on a particular port. This works perfectly between 2 devices using the same carrier.
    if I try sending & receive inter-carrier SMS, like from T-Mobile device to Cingular device (or vice-versa), my j2me app does not receive any SMS on the port it is listening to.
    When the SMS with a port is sent from my app, I get the prompt for permission to send. On pressing OK, the SMS is sent. On the receiving side, the device on the another carrier network receives the SMS in the default inbox, & not by my app.
    I am not sure if this is a inter-carrier SMSC issue or something to do with my app.
    Pl help.

    Has anyone come across the above mentioned problem? Pl let me know if there is any solution.
    Question simply put : When a j2me sms midlet sends an sms on a unique port to another j2me sms midlet listening on the same port, but served by a different carrier (cellular operator), why does the sms go to device inbox & not to my midlet?
    Thank you

  • Why is the "Send to iDVD" command missing from the share menu in iPhoto 9.4.3 when trying to send a slideshow to iDVD?

    How come the "Send to iDVD" command is missing from the share menu? In iPhoto I used to be able to send my slideshows to iDVD simply my clicking on the slideshow, selecting the "Share" menu at the top and going to "Send to iDVD". Now in iPhoto 9.4.3 that option is missing.
    Further i am also using iDVD 7.1.2 and running OSX version 10.8.3.
    Thanks!

    Export the slideshow via the Export button at the bottom of the slideshow window with Size = Medium or Large.
    Open iDVD, choose a theme and drag the exported movie file to the menu window being careful to avoid any drop zones.
    Follow this workflow to help ensure the best quality video DVD:
    Once you have the project as you want it save it as a disk image via the  File ➙ Save as Disk Image  menu option.  This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image and launch DVD Player and play it.  If it plays OK with DVD Player the encoding was good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • Acrobat X Pro does not open, gives fatal error - "Acrobat failed to send a DDE command"

    Acrobat X Pro does not open and gives fatal error - "Acrobat failed to send a DDE command"
    It either does the above or the application starts and is listed in the system processes but never physically opens on the desktop for viewing.

    AA 9 will not work for anything but the print function from WORD 2010. The only version of Acrobat that is compatible with OFFICE 2010 for PDF Maker is AA X. Thus, open WORD and print to the Adobe PDF printer. Then open the pdf in Acrobat. Go to FORMS>Add or Edit fields. Since you have no fields at present, Acrobat will ask if you would like to detect form fields. Answer yes and you will get a first cut at the form fields. Yes, you will likely have to add some more and change the ones that Acrobat estimates, but you are on your way.
    The other two options you have is to go back to WORD 2007 or earlier or upgrade to AA X (or find someone with AA X and WORD 2010). These methods are pretty much your options with the software combination that you have.

  • Java Mail: send a SINGLE email to a distribution list

    Is it possible to send a single email to a distribution list using Java Mail?
    Please help with some code samples.
    Right now, our mail program uses java mail api to send one email/person in the distribution list and runs in a for loop. Is it possible to have the distribution list in the to field and just send one single email to all persons in the list?
    Thanks,
    Jayashree.

    Yes, of course, assuming your mail server supports
    distribution lists. Most mail servers do, but exactly
    how you create and administer a mailing list varies
    from server to server.
    Once you've created the mailing list on the server,
    just use the name of the list in the To field of the
    message.

  • Tcp/ip write help - need to send a motor command with parameters

    hello - i have one small, main labview 7.0 vi that i use to control a drill's two motors.
    right now i press a button on the front panel to move the motor, and when i do, a sub vi window pops up so the operator can set a couple of parameters and press an ok button.....the vi then sends the command with the parameters to the drill's motors.
    i am trying to change it so i can send the move command from another computer, in another room, while the main vi sits on the computer with the drill. i know i will use TCP listen, write, read, and close in both the main vi (the TCP server?) and the client which is on the remote computer.
    my problem is with setting the parameters for the subvi's that usually pops up. how do i set the parameters from the remote-client and have them be sent into the subvi on the main vi. if i can do this, i would have to also have a way to close the sub vi after it pops up in the main program too.
    OR should i use something else like and application reference or an invoke node function?????
    please help
    thanks!!!!
    sam

    Hi again,
    If the VI in the lab will be running continuously, then you will need
    to alter some things from the example I sent you or look at an
    alternate implementation. The example I sent you assumed that the VI in
    the lab was not running. This technique actually starts the VI and runs
    it somewhat like a subVI. It inputs values into the connector pane,
    runs it, and then returns values from the outputs on the connector pane
    after it finishes executing. It will not work to call a VI by reference
    if it is already continuously running.
    Instead I imagine you would want to have your VI in the lab have some
    sort of State Machine that polls a certain control value, such as an
    enum control, to determine which state to execute next. You could
    modify the technique I first sent to still open a reference to the VI
    in the lab, but it wouldn't try to run it. Instead you could use the VI
    method Set Control Value to set the value of a certain control or
    controls in the lab VI to certain values. The VI in the lab would then
    hopefully be in some Idle state where it polled one of those control
    values continuously to decide what to do next. That would allow the VI
    in the office to programmatically send commands to the other VI, as
    well as parameters for those commands. Simply set control values for
    the VI in the lab and let the VI in the lab go about its business. I've
    attached an example below.
    That's just one idea. Other options you have would be to use a
    DataSocket connection to send parameters and commands back and forth
    between computers. This is a pretty simple API to use. If you have
    LabVIEW 8, Shared Variables are an option. Or you might look into
    simply using Remote Front panels, which allows you to connect to a VIs
    Front Panel across the network. You could then have the whole VI in the
    Lab, but you could connect to it, view it, modify the controls and so
    on from your office. If you want to view and control a VI without
    having LabVIEW installed on the viewing computer, you can use the Web
    Publishing Tool to create a web interface for your front panel. Lots of
    options. Let me know what sounds interesting.
    Jarrod S.
    National Instruments
    Attachments:
    Lab_VI.vi ‏29 KB
    Office_VI.vi ‏51 KB

  • Send a Single Message to a Client

    What is the best way to send a single message from the server to a client using flex/blazeds? The one caveat is that the message could take several minutes before it is sent. Think of a long calculation that is done on the server that the client waits for. I've thought of the following options:
    1) Just use a RemoteObject and call a method. Would there be any problems with the response taking several minutes to come back? I would also ideally like to have a single thread which sends all the responses to the clients in a batch, rather than the standard route of each client's remote method call spawning a thread which returns the result; anyone know where to get started here?
    2) Create a new destination and consume that destination on each client. The destination and consumer could be closed on each client after the first message is received.
    Which is the best option?
    Thanks,
    Gordon

    It looks like you need a mechanism where the client registers with the server, then server does some long calculation, and then when the result is available, server sends the result back to the client. Messaging (option #2) sounds like a good fit for this.
    Some thing to note:
    - You can use subtopics so each client is subscribed to the same destination but has its own subtopic to receive updates from.
    - You need to use a realtime channel (polling, long-polling, or streaming) so that the consumer can receive updates. I suggest long-polling with a really long wait time.

Maybe you are looking for