Clearing RS232-GPIB Prior to sending commands to Agilent N3300A

I have been trying to communicate with an Agilent N3300A DC Load Bank via a CRIO 9012 Com port and NI GPIB-RS232 converter. 
The communications is somewhat buggy and the instrument does always do as instructed.   I have tried adding time outs (which should not be required but that does not help.
How do I flush the RS232 converter ahead of every command in the hope this will help clean up the communications between the CRIO and GPIB instrument?
Thanks
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

What is the purpose of this command scheme?
Do you want to have a sweep range?
In that case you can most likely prepare the instrument to react on analog triggers to go to the next frequency.
Look into the GPIB examples of your instrument and into the GPIB command set of your instrument you might find something interesting.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • GPIB 488.2 Send command

    Why is it that when I use the GPIB 488.2 Send command, using the string "ID", it sends the string over and over again? I just want it to send the string once.

    The Send command should only send the string once. Could you possibly attach an NI-Spy log or a GPIB Analyzer capture to show us the problem?

  • Labview GPIB Tutorial for sending commands to gen purpose equipment

    Hi
    I am reading an old NI GPIB "in-depth course" (in dos). It seems quite easy to send and receive GPIB command. Is there a GPIB tutorial for labview that will show me how to set up a piece of equipment and send/receive commands?
    Wayne

    Yes. If you have LabVIEW 6 or later, look in the LabVIEW Measurements Manual (a printed manual in your LabVIEW box, as well as a PDF installed with LabVIEW).
    First of all, there are two ways to program GPIB. You can use the Traditional GPIB VIs, or you can use VISA. Both APIs are simple, but you probably want to use VISA. VISA works over GPIB, USB, Ethernet, Serial, etc., so learning it will apply to future projects, too.
    In the 6.x version of the Measurements Manual, read chapter 20. In the 7.x version, read chapter 16. In either case, we have examples of using VISA to communicate with instruments.
    This will give you a brief introduction to VISA. If you want to learn more, there are more advanced tutorials available on NI's web site, such as
    href="http://www.ni.com/swf/presentation/us/instcontrol/">this one.
    I hope this helps.
    Brian

  • Sometimes GPIB controller did not command the instrument to talk while the high-level program did have "READ" command.

    GPIB controller should send "UNL", "LA0", "TAxx" to command the instrument to talk. Though the program do have the "READ?" query, sometimes GPIB controller didn't send the above commands from NI Spy, resulting in the system is hanging there. It happens randomly.

    HI,
    It is not clear to me what is going on. I'd like to get more information.
    Could you specify what programming language are you using?. Also, what functions are you using?. What driver version are you using?.
    Include any information you think might be helpful. Also, attach the Spy capture.
    DiegoF.

  • Cannot start Virtual Machine - OVMAPI_4010E Attempt to send command: dispat

    1. Instaleed Virtualbox on Windows 7
    2. Installed OracleVM-Manager-3.1.1-build365.ova and OracleVM-Server-3.1.1-build365.ova
    3. Completed repository and server pool. They are all runing fine.
    4. Crated a Virtual Machine for Linux and tried to start the Virtual Machine and got the following error.
    Any comments or help would be appreciated.
    Thank you...
    ob Construction Phase
    begin()
    Appended operation 'Virtual Machine Start' to object '0004fb00000600009526838f3d4be255 (first vm)'.
    Appended operation 'Bridge Configure Operation' to object '0004fb0000200000b137e9cddcdd09b8 (network.BondPort (1) in myserver1.example.com)'.
    commit()
    Completed Step: COMMIT
    Objects and Operations
    Object (IN_USE): [VmDiskMapping] 0004fb00001300008e359279b91c2804
    Object (IN_USE): [Vnic] 0004fb0000070000cca7bba64be932d0 (00:21:f6:00:00:09)
    Object (IN_USE): [VirtualMachine] 0004fb00000600009526838f3d4be255 (first vm)
    Operation: Virtual Machine Start
    Object (IN_USE): [BondPort] 0004fb0000200000b137e9cddcdd09b8 (network.BondPort (1) in myserver1.example.com)
    Operation: Bridge Configure Operation
    Object (IN_USE): [VmDiskMapping] 0004fb0000130000d15838ce48a895f1
    Object (IN_USE): [VirtualCdrom] EMPTY_CDROM
    Object (IN_USE): [VirtualDisk] 0004fb0000120000efbd814b4b7c0e8d.img
    Job Running Phase at 14:57 on Sun, Jul 29, 2012
    Job Participants: [c7:c1:6e:69:b9:a7:41:d6:8d:8e:bc:d5:fd:c3:c4:7d (myserver1.example.com)]
    Actioner
    Starting operation 'Virtual Machine Start' on object '0004fb00000600009526838f3d4be255 (first vm)'
    Completed operation 'Virtual Machine Start' completed with direction ==> LATER
    Starting operation 'Bridge Configure Operation' on object '0004fb0000200000b137e9cddcdd09b8 (network.BondPort (1) in myserver1.example.com)'
    Bridge [192.168.1.0] already exists (and should exist) on interface [bond0] on server [myserver1.example.com]; skipping bridge creation
    Completed operation 'Bridge Configure Operation' completed with direction ==> DONE
    Starting operation 'Virtual Machine Start' on object '0004fb00000600009526838f3d4be255 (first vm)'
    Job Internal Error (Operation)com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_4010E Attempt to send command: dispatch to server: myserver1.example.com failed. OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/2 start_vm 0004fb00000300003907f6fd90ef0e08 0004fb00000600009526838f3d4be255, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command: ['xm', 'create', '/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg'] failed (1): stderr: Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?
    stdout: Using config file "/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg".
    Sun Jul 29 14:57:14 PDT 2012
    Sun Jul 29 14:57:14 PDT 2012
    at com.oracle.ovm.mgr.action.ActionEngine.sendCommandToServer(ActionEngine.java:507)
    at com.oracle.ovm.mgr.action.ActionEngine.sendDispatchedServerCommand(ActionEngine.java:444)
    at com.oracle.ovm.mgr.action.ActionEngine.sendServerCommand(ActionEngine.java:378)
    at com.oracle.ovm.mgr.action.VirtualMachineAction.sendStartVmCommand(VirtualMachineAction.java:121)
    at com.oracle.ovm.mgr.op.virtual.VirtualMachineStart.asyncAction(VirtualMachineStart.java:65)
    at com.oracle.ovm.mgr.api.collectable.ManagedObjectDbImpl.executeCurrentJobOperationAsyncAction(ManagedObjectDbImpl.java:1002)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.storage.Transaction.invokeMethod(Transaction.java:826)
    at com.oracle.odof.core.Exchange.invokeMethod(Exchange.java:245)
    at com.oracle.ovm.mgr.api.virtual.VirtualMachineProxy.executeCurrentJobOperationAsyncAction(Unknown Source)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectAsyncStart(JobEngine.java:596)
    at com.oracle.ovm.mgr.op.virtual.VirtualMachineStart.action(VirtualMachineStart.java:52)
    at com.oracle.ovm.mgr.api.collectable.ManagedObjectDbImpl.executeCurrentJobOperationAction(ManagedObjectDbImpl.java:1012)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.storage.Transaction.invokeMethod(Transaction.java:826)
    at com.oracle.odof.core.Exchange.invokeMethod(Exchange.java:245)
    at com.oracle.ovm.mgr.api.virtual.VirtualMachineProxy.executeCurrentJobOperationAction(Unknown Source)
    at com.oracle.ovm.mgr.api.job.JobEngine.operationActioner(JobEngine.java:218)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectActioner(JobEngine.java:309)
    at com.oracle.ovm.mgr.api.job.InternalJobDbImpl.objectCommitter(InternalJobDbImpl.java:1140)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.BasicWork.invokeMethod(BasicWork.java:136)
    at com.oracle.odof.command.InvokeMethodCommand.process(InvokeMethodCommand.java:100)
    at com.oracle.odof.core.BasicWork.processCommand(BasicWork.java:81)
    at com.oracle.odof.core.TransactionManager.processCommand(TransactionManager.java:773)
    at com.oracle.odof.core.WorkflowManager.processCommand(WorkflowManager.java:401)
    at com.oracle.odof.core.WorkflowManager.processWork(WorkflowManager.java:459)
    at com.oracle.odof.io.AbstractClient.run(AbstractClient.java:42)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.oracle.ovm.mgr.api.exception.IllegalOperationException: OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/2 start_vm 0004fb00000300003907f6fd90ef0e08 0004fb00000600009526838f3d4be255, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command: ['xm', 'create', '/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg'] failed (1): stderr: Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?
    stdout: Using config file "/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg".
    Sun Jul 29 14:57:14 PDT 2012
    at com.oracle.ovm.mgr.action.ActionEngine.sendAction(ActionEngine.java:798)
    at com.oracle.ovm.mgr.action.ActionEngine.sendCommandToServer(ActionEngine.java:503)
    ... 41 more
    FailedOperationCleanup
    Starting failed operation 'Virtual Machine Start' cleanup on object 'first vm'
    Complete rollback operation 'Virtual Machine Start' completed with direction=first vm
    Rollbacker
    Executing rollback operation 'Virtual Machine Start' on object '0004fb00000600009526838f3d4be255 (first vm)'
    Complete rollback operation 'Virtual Machine Start' completed with direction=DONE
    Executing rollback operation 'Bridge Configure Operation' on object '0004fb0000200000b137e9cddcdd09b8 (network.BondPort (1) in myserver1.example.com)'
    Complete rollback operation 'Bridge Configure Operation' completed with direction=DONE
    Objects To Be Rolled Back
    Object (IN_USE): [VmDiskMapping] 0004fb00001300008e359279b91c2804
    Object (IN_USE): [Vnic] 0004fb0000070000cca7bba64be932d0 (00:21:f6:00:00:09)
    Object (IN_USE): [VirtualMachine] 0004fb00000600009526838f3d4be255 (first vm)
    Object (IN_USE): [BondPort] 0004fb0000200000b137e9cddcdd09b8 (network.BondPort (1) in myserver1.example.com)
    Object (IN_USE): [VmDiskMapping] 0004fb0000130000d15838ce48a895f1
    Object (IN_USE): [VirtualCdrom] EMPTY_CDROM
    Object (IN_USE): [VirtualDisk] 0004fb0000120000efbd814b4b7c0e8d.img
    Write Methods Invoked
    Class=InternalJobDbImpl vessel_id=1342 method=addTransactionIdentifier accessLevel=6
    Class=VirtualMachineDbImpl vessel_id=1085 method=start accessLevel=6
    Class=VnicDbImpl vessel_id=958 method=lock accessLevel=6
    Class=VirtualCdromDbImpl vessel_id=209 method=lock accessLevel=6
    Class=VirtualDiskDbImpl vessel_id=1107 method=lock accessLevel=6
    Class=VnicDbImpl vessel_id=958 method=lock accessLevel=6
    Class=VmDiskMappingDbImpl vessel_id=1116 method=lock accessLevel=6
    Class=VmDiskMappingDbImpl vessel_id=1122 method=lock accessLevel=6
    Class=VirtualCdromDbImpl vessel_id=209 method=lock accessLevel=6
    Class=VirtualDiskDbImpl vessel_id=1107 method=lock accessLevel=6
    Class=VirtualMachineStartingEventDbImpl vessel_id=1351 method=notify accessLevel=6
    Class=VirtualMachineStartingEventDbImpl vessel_id=1351 method=setDescription accessLevel=6
    Class=BondPortDbImpl vessel_id=554 method=addJobOperation accessLevel=6
    Class=InternalJobDbImpl vessel_id=1342 method=setCompletedStep accessLevel=6
    Class=InternalJobDbImpl vessel_id=1342 method=setAssociatedHandles accessLevel=6
    Class=InternalJobDbImpl vessel_id=1342 method=setTuringMachineFlag accessLevel=6
    Class=VirtualMachineDbImpl vessel_id=1085 method=setCurrentOperationToLater accessLevel=6
    Class=InternalJobDbImpl vessel_id=1342 method=setTuringMachineFlag accessLevel=6
    Class=BondPortDbImpl vessel_id=554 method=setCurrentJobOperationComplete accessLevel=6
    Class=BondPortDbImpl vessel_id=554 method=nextJobOperation accessLevel=6
    Class=VirtualMachineDbImpl vessel_id=1085 method=nextJobOperation accessLevel=6
    Class=InternalJobDbImpl vessel_id=1342 method=setFailedOperation accessLevel=6
    Class=VmDiskMappingDbImpl vessel_id=1116 method=nextJobOperation accessLevel=6
    Class=VnicDbImpl vessel_id=958 method=nextJobOperation accessLevel=6
    Class=VirtualMachineDbImpl vessel_id=1085 method=nextJobOperation accessLevel=6
    Class=BondPortDbImpl vessel_id=554 method=nextJobOperation accessLevel=6
    Class=VmDiskMappingDbImpl vessel_id=1122 method=nextJobOperation accessLevel=6
    Class=VirtualCdromDbImpl vessel_id=209 method=nextJobOperation accessLevel=6
    Class=VirtualDiskDbImpl vessel_id=1107 method=nextJobOperation accessLevel=6
    Class=VirtualMachineDbImpl vessel_id=1085 method=nextJobOperation accessLevel=6
    Class=BondPortDbImpl vessel_id=554 method=nextJobOperation accessLevel=6
    Completed Step: ROLLBACK
    Job failed commit (internal) due to OVMAPI_4010E Attempt to send command: dispatch to server: myserver1.example.com failed. OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/2 start_vm 0004fb00000300003907f6fd90ef0e08 0004fb00000600009526838f3d4be255, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command: ['xm', 'create', '/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg'] failed (1): stderr: Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?
    stdout: Using config file "/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg".
    Sun Jul 29 14:57:14 PDT 2012
    Sun Jul 29 14:57:14 PDT 2012
    com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_4010E Attempt to send command: dispatch to server: myserver1.example.com failed. OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/2 start_vm 0004fb00000300003907f6fd90ef0e08 0004fb00000600009526838f3d4be255, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command: ['xm', 'create', '/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg'] failed (1): stderr: Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?
    stdout: Using config file "/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg".
    Sun Jul 29 14:57:14 PDT 2012
    Sun Jul 29 14:57:14 PDT 2012
    at com.oracle.ovm.mgr.action.ActionEngine.sendCommandToServer(ActionEngine.java:507)
    at com.oracle.ovm.mgr.action.ActionEngine.sendDispatchedServerCommand(ActionEngine.java:444)
    at com.oracle.ovm.mgr.action.ActionEngine.sendServerCommand(ActionEngine.java:378)
    at com.oracle.ovm.mgr.action.VirtualMachineAction.sendStartVmCommand(VirtualMachineAction.java:121)
    at com.oracle.ovm.mgr.op.virtual.VirtualMachineStart.asyncAction(VirtualMachineStart.java:65)
    at com.oracle.ovm.mgr.api.collectable.ManagedObjectDbImpl.executeCurrentJobOperationAsyncAction(ManagedObjectDbImpl.java:1002)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.storage.Transaction.invokeMethod(Transaction.java:826)
    at com.oracle.odof.core.Exchange.invokeMethod(Exchange.java:245)
    at com.oracle.ovm.mgr.api.virtual.VirtualMachineProxy.executeCurrentJobOperationAsyncAction(Unknown Source)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectAsyncStart(JobEngine.java:596)
    at com.oracle.ovm.mgr.op.virtual.VirtualMachineStart.action(VirtualMachineStart.java:52)
    at com.oracle.ovm.mgr.api.collectable.ManagedObjectDbImpl.executeCurrentJobOperationAction(ManagedObjectDbImpl.java:1012)
    at sun.reflect.GeneratedMethodAccessor683.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.storage.Transaction.invokeMethod(Transaction.java:826)
    at com.oracle.odof.core.Exchange.invokeMethod(Exchange.java:245)
    at com.oracle.ovm.mgr.api.virtual.VirtualMachineProxy.executeCurrentJobOperationAction(Unknown Source)
    at com.oracle.ovm.mgr.api.job.JobEngine.operationActioner(JobEngine.java:218)
    at com.oracle.ovm.mgr.api.job.JobEngine.objectActioner(JobEngine.java:309)
    at com.oracle.ovm.mgr.api.job.InternalJobDbImpl.objectCommitter(InternalJobDbImpl.java:1140)
    at sun.reflect.GeneratedMethodAccessor1084.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:329)
    at com.oracle.odof.core.AbstractVessel.invokeMethod(AbstractVessel.java:289)
    at com.oracle.odof.core.BasicWork.invokeMethod(BasicWork.java:136)
    at com.oracle.odof.command.InvokeMethodCommand.process(InvokeMethodCommand.java:100)
    at com.oracle.odof.core.BasicWork.processCommand(BasicWork.java:81)
    at com.oracle.odof.core.TransactionManager.processCommand(TransactionManager.java:773)
    at com.oracle.odof.core.WorkflowManager.processCommand(WorkflowManager.java:401)
    at com.oracle.odof.core.WorkflowManager.processWork(WorkflowManager.java:459)
    at com.oracle.odof.io.AbstractClient.run(AbstractClient.java:42)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.oracle.ovm.mgr.api.exception.IllegalOperationException: OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/2 start_vm 0004fb00000300003907f6fd90ef0e08 0004fb00000600009526838f3d4be255, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command: ['xm', 'create', '/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg'] failed (1): stderr: Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?
    stdout: Using config file "/OVS/Repositories/0004fb00000300003907f6fd90ef0e08/VirtualMachines/0004fb00000600009526838f3d4be255/vm.cfg".
    Sun Jul 29 14:57:14 PDT 2012
    at com.oracle.ovm.mgr.action.ActionEngine.sendAction(ActionEngine.java:798)
    at com.oracle.ovm.mgr.action.ActionEngine.sendCommandToServer(ActionEngine.java:503)
    ... 41 more
    End of Job

    As far you are using VirtualBox, your processor capabilities shouldn't counted (min from my own experience while setting up the virtual machine. Change the Domain Type under configuation node to XEN PVM and try again. Most probably the virtual machine will start running.
    One more thing, enable promiscuous mode -> Allow allow with your network configuration (if bridged network is in use) for the VM Server prior you try to SSH into the virtual machine (your guest on VM Server)
    All the best and post your test results
    regards,
    raj

  • Unable to send command to smart card reader

    i am writing code for reading/writing to a smart card through a smart card reader which support RS232 serial communication.
    Problem is that the reader is not responding to the commands i send to it.
    My Smart CArd reader (HID 6055 Mifare Smart CArd reader) sends some ack when it is switched on. That data i am able to receive though the following code.
    So i think i am unable to write (send command ) to the reader.
    Also how do i debug my code to see whether the command is actually being sent or not. I tried hyper terminal but if i use hyper terminal then the java prog is not able to open an OtputStream for writing to the smart card.
    I appreciate your kind help...
    My prog is
    *The
    import javax.comm.*;
    import java.io.*;
    import java.util.Enumeration;
    import java.util.TooManyListenersException;
    public class SmartCard
         public static void main(String args[])
              CardReader cs=new CardReader();
              cs.setConnectionParameters();
              if(cs.scanForCard())
                   System.out.println("Successfully sent Scan command to the reader");
    class CardReader implements SerialPortEventListener //,CommPortOwnershipListener
         CommPortIdentifier portId;
         Enumeration portList;
         InputStream inputStream;
         OutputStream outputStream;
         SerialPort serialPort;
         String outputString="";
         String inputSting="";
         public CardReader()
              portList = CommPortIdentifier.getPortIdentifiers();
               while (portList.hasMoreElements())
                portId = (CommPortIdentifier) portList.nextElement();
                if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
                     if (portId.getName().equals("COM1"))
                             System.out.println("Port Found");
                             break;
         public void setConnectionParameters()
              System.out.println("Setting Parameters for "+portId.getName());
              try
                serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
            catch (PortInUseException e)
                 System.out.println("PortInUseException in CardReader.setConnectionParameters :"+e);
             try
                  serialPort.addEventListener(this);
              catch (TooManyListenersException e)
                   System.out.println("Error in adding EventListener to serial Port: "+e);
            try
                inputStream = serialPort.getInputStream();
            catch (IOException e)
                 System.out.println("IoException in CardReader.setConnectionParameters while setting inputStream :"+e);
            try
                outputStream = serialPort.getOutputStream();
            catch (IOException e)
                 System.out.println("IoException in CardReader.setConnectionParameters while setting outputStream :"+e);
              serialPort.notifyOnDataAvailable(true); //We will check for
              try
                serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
            catch (UnsupportedCommOperationException e)
                 System.out.println("Exception in setting the Baud Rate: "+e);
         public boolean scanForCard()
              boolean result=false;
              outputString="AA521D26000A";//Command for Scanning a Card
              // outputString="AA4C280810201C";
              // byte[] cmd=new byte[]{'A','A','5','2','1','D','2','6','0','0','0','A'};
              byte[] cmd=new byte[]{'8','0','4','C','2','8','0','8','1','0','2','0','1','C'};
              try
                 //outputStream.write(outputString.getBytes());
                 outputStream.write(cmd);
                 result=true;
            catch (IOException e)
                 System.out.println("Error in writing scan command to smart card: "+ e);
                 result=false;
              return result;
         public void serialEvent(SerialPortEvent event)
              System.out.println("\nSome Event Occured");
              switch(event.getEventType())
                 case SerialPortEvent.BI: System.out.println("event no 1");
                 case SerialPortEvent.OE: System.out.println("event no 2");
                 case SerialPortEvent.FE: System.out.println("event no 3");
                 case SerialPortEvent.PE: System.out.println("event no 4");
                 case SerialPortEvent.CD: System.out.println("event no 5");
                 case SerialPortEvent.CTS: System.out.println("event no 6");
                 case SerialPortEvent.DSR: System.out.println("event no 7");
                 case SerialPortEvent.RI: System.out.println("event no 8");
                 case SerialPortEvent.OUTPUT_BUFFER_EMPTY: {System.out.println("event no 9");
                      break;}
                 case SerialPortEvent.DATA_AVAILABLE:{System.out.println("event no 10");
                      readDataFromReader();}
                      break;
         public void readDataFromReader()
              System.out.print("Some data Sent by the Smart Card");
              byte[] readBuffer = new byte[20];
            try
                 while (inputStream.available() > 0)
                     int numBytes = inputStream.read(readBuffer);
             System.out.print(new String(readBuffer));
             catch (IOException e)
                  System.out.println("Some Error Occured in reading the data sent by Reader: "+e);

    hi all..
    Im new to this technology and wanna learn and try to program some simple applications using Smart Card...
    Reading thru all the topics above, Im wonderring is the Card Reader able write codes to the Smart Card, or maybe jux simply able to update the info inside the card??
    I also heard about Card Decoder as well, I mean if the Card Reader can do the task.. why do we need Card Decoder ?!
    Sorry if I stated something wrong... Im new and hope that someone could share some valuable knowledges here...
    Thanks much much !!

  • Sending commands via usb port?

    i'm looking to send commands over a usb cable to a device via xcode or cocoa. i know leopard did away with rs232 commands, so i'm looking for some sample code that sends a command via objective-c over a usb cable.

    From Cameron Forbes of US FTDI tech support:
    Ed:
    After you install the FTDI D2XX drivers for Mac OS X (Intel Macs):
    http://www.ftdichip.com/Drivers/D2XX/MacOSX/UniBin/Universal%20D2XX0.1.4.dmg
    Add the following links (from Mac OS X Installation Guide):
    · Start a Terminal session (Go > Applications > Utilities > Terminal)
    · Copy libftd2xx.0.1.0.dylib to the /usr/local/lib directory (cp Desktop/D2XX/bin/libftd2xx.0.1.0
    /usr/local/lib)
    · Change directory to the /usr/local/lib (cd /usr/local/lib)
    · Create a symbolic link to the library (ln -sf libftd2xx.0.1.0.dylib libftd2xx.dylib)
    The example code is located at:
    /desktop/d2xx/Samples
    Best Regards,
    Cameron Forbes
    Field Applications Engineer - Americas
    [email protected]
    Future Technology Devices International Ltd.
    7235 NW Evergreen Parkway
    Suite 600
    Hillsboro, OR 97124-5803
    Tel: 503.547.0988 xt 315
    Fax: 503.547.0987
    Practical USB Interface Solutions

  • Send command from my own application

    Hi,
    I have some problem to send commands to �Instrument�, which connect to computer via GPIB card.
    I use my own application with advanced script language and 16-bit GPIB ISA card, OS � Windows 2000. I have send to �Instrument� command as string.
    Here is fragment of code :

    LoadLib(�gpib-32.dll�) <-- Loading DLL
    RunLibFunc(handler, , ) <-- Running function from DLL

    - the name of function from DLL � should be something like �Send�
    - array of arguments for the function : GPIB card ID, GPIB address of �Instrument�, my string, and something else �
    Please Help me to find exactly commands syntax and the way to use it.
    Thanks in advance

    Dennis is correct, you can find information about the functions in the help file.
    You can also find a list of functions in the "NI 488.2 Function Reference":
    http://digital.ni.com/manuals.nsf/websearch/35cd6168125e0ebd86256789006e84d4
    The 488.2 user's manual may also be helpful:
    http://digital.ni.com/manuals.nsf/websearch/2c9c18cf53d69f678625678d005075e9
    Salvador Santolucito
    Applications Engineering
    National Instruments

  • VISA sending command thru Ethernet

    Hi
    I am using VISA library to communicate with an instrument thru ethernet. I wonder if viPrintf blocks itself until it's done sending all strings in a command, and if viQueryf also blocks itself until it's done receiving all strings in the reply message.
    I use VISA library version 4.1 and I get an intermittent error when I send command to a signal generator. The error was something like "SignalGenerator.exe has encountered an problem and needs to close. We are sorry for the inconvenience."  and SignalGenerator.exe hangs. (SignalGenerator.exe is the program I wrote using VISA library. Have you ever had that problem before?
    I also wonder if I have viPrintf then followed by viQueryf, is a good practice to put a delay after viPrintf (before viQueryf) ? and if I have viPrintf followed by viPrintf, should I put a delay in between? Please bare in mind that I use ethernet, not GPIB. If you think I should put a delay, how many ms of delay should it be?
    Thanks

    Hi
    Please see my answer in italics below
    by the way, is GPIB more reliable than Ethernet? (basically I just want the instrument to perform according to the command I send to it without any errors)
    thanks
    In order to help, we're going to have to get more information.  Are you running an executable? 
    yes. I am running executable. Single-threaded.
     Do you have access to the source code? 
    Yes, please see the attachment.
     What drivers are you using? 
    NI Visa 4.10 for windows. I have WindowsXP. Do I need any special patch from Microsoft to run NI Visa properly?
     What versions? 
    What is your code doing?
    My code controls Anritsu MG3700A Signal generator (eg sending commands to it to output signal, change frequency,...)
    Attachments:
    code.rtf ‏6 KB

  • Send commands

    Hello I need to send commands through ethernet connections,
    specifing an IP address and port... similar some xTras with RS-232
    protocol, but with ethernet. Are there any command or xTra?
    Thank you

    My apologies, it is still not clear to me exactly what you
    are trying to
    achieve. Can you be a bit more specific?
    My experience with video projectors is limited to connecting
    them to the
    VGA port on a laptop to project an presentation onto a
    screen. Things
    like powering them on, focusing, adjusting the image, etc,
    I've only
    done using the buttons on the projector itself.
    Is this the sort of "manage" tasks you are referring to? Does
    the
    projector you are referring to have some interface with a PC
    that allows
    you to do these thing via the computer?
    lbadosa wrote:
    > I need to manage devices like video projectors or
    similar
    >
    > thanks

  • How do I send commands to my oscilloscope in NIMAX?

    Hello all,
    I am new to LabView and have purchased a digital oscilloscope & a digital signal generator. 
    I have the Remote command list for each of them. 
    The oscilloscope is USB, and the signal generator only has an RS232 port. 
    I am able to send commands to the oscilloscope through the EasyScope software that came with the scope, such as *CAL?, which successfully calibrates my scope.
    However, I cannot get my scope to respond in NIMAX.   Nor am I able to get the Signal Generator to work in either NIMAX or EasyScope.  
    Could someone tell me what I need to do to activate my USB channel in NIMAX, and also my RS232 channel?  
    Solved!
    Go to Solution.

    These are cheaper devices from ATTEN.   They also go under the name Siglent.   I have an ADS1102CAL+ scope, and a ATF20D+PA signal generator.  
    I am running 64bit Windows 8.    I am able to get both the scope & COM1 serial port to show up in NIMax and they look good in Device manager. 
    The Serial cable is a USB to RS232 adapter, since my PC has no serial ports.
    The test panel returns a string for the scope serial number using *IDN?, but none of the other commands work. 
    Here are 3 screenshots.  3rd shot is 2 commands (*IDN? & *CAL? for the USB Scope.  )
    I have not been able to get the USB drivers to work or install from their website.
    Attachments:
    NIMax shot 1.jpg ‏139 KB
    NIMax shot 2.jpg ‏107 KB
    NIMAX shot 3.jpg ‏97 KB

  • GPIB-232CT-A Serial commands problems

    Hi
    I am using the GPIB-232CT-A to send commands to a network analyser
    using the serial coms commands and I am having the following problems:
    1) Network analyser only responds to the command only if I reset the analyser.
    2) I cannot send more than 2 commands. The analyser only responds to the first command.
    Do you know which commands I must use to send more than one command
    without having to reset the analyser everytime I need to send the
    command.
    The command that I use is 'wrt ' .
    Thanks in advance.

    Hi,
    it would be better if you re-post this here http://forums.ni.com/ni/board?board.id=140
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • Sending command apdu with a byte array as CDATA

    Hi,
    I am learning java card as part of my final year project. So far I think I can do most of the basic things but I have got stuck at one particular point.
    I know that there are different constructors for creating a command apdu object and a number of these constructors take an array of bytes as CDATA values.
    My problem is, how to access this array of data in the card side because apdu.getBuffer() returns an array of integers (bytes)? And what is actually on apdu.getBuffer()[ISO7816.OFFSET_CDATA)] location when you send command apdu object using such a constuctor?
    regards
    Edited by: 992194 on 06-Mar-2013 06:12

    992194 wrote:
    (..) I should have mentioned earlier that my card use jc 2.2.1 version, and i have read from different places that this version does not support ExtendedLength facility.Indeed.
    Also I understand the semantics of apdu.getBuffer()[ISO7816.OFFSET_CDATA] that is the first byte of the command data. My question is, this command data was initially supplied as an array of bytes. Something like this:
    +new CommandAPDU(CLA, INS, P1, P2, DATA_ARRAY, Le)+
    So when you call:
    byte [] buffer = apdu.getBuffer()
    So does this mean that the byte values inside DATA_ARRAY automatically occupy locations +buffer[ISO7816.OFFSET_CDATA]+ onwards inside the buffer?Yes. The length would be<tt> (short)(buffer[ISO7816.OFFSET_LC]&0xFF) </tt>. Notice the<tt> &0xFF </tt> is a must above 127 bytes.
    Or their is a mechanism of extracting the DATA_ARRAY array itself?No.
    In fact, in the interest of performance and portability in environments with little memory, the usual coding style is to pass<tt> buffer </tt>, an offset within that, and the length; rather than making an object, which would require a copy. Welcome to the real world of Java Card.

  • Can't send command to SMTP host

    Hi,
    I am using Jdev11.1.1.2.0 and web logic servere10.3.I am using mail scheduling in weblogic.Actually in window server 2003 I am getting exception is
    get message method--->Can't send command to SMTP host
    javax.mail.MessagingException: Can't send command to SMTP host;
    nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    But same application windows7 Its working.
    So can u give me the idea ? or any configuration webloigc in windows server 2003 ?
    Plz help me.
    Thanks
    Anup

    I put environment variable (path) weblogic.jar but still same issue
    get message method--->Can't send command to SMTP host
    javax.mail.MessagingException: Can't send command to SMTP host;
    nested exception is:
         javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
    Plz give me the solution..
    Thanks
    Anup

  • Sending Command Line Arguments to Jar Executable

    Hi All
    I wish to send Command Line Arguments to Jar Executable.
    i.e. before I Jar'd my program, I would do the following
    public class CmdLnArgmntExp {
    public static void main(String[] args) {
    System.out.println("d");
    for (int i = 0; i < args.length; i++)
    System.out.println(args);
    Running the program in Console.
    Java CmdLnArgmntExp arg1 arg2 arg3 arg4Output:
    arg1
    arg2
    arg3
    arg4
    How would I do this to a Jar executable, hope that made sense
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    java -jar executable-jar-file-containing-class-CmdLnArgmntExp.jar arg1 arg2 arg3 arg4

Maybe you are looking for

  • Thumbnail but no photo?

    Hi, there are some photos for which I seem to have only the Thumbnail but not the actual photo.  Is there are way to fix this?  I am not sure whether the photos were deleted or something is corrupted.  In case it might help, after reading a previous

  • Error:UNCAUGHT_EXCEPTION while loading data with exception  CX_RSR_X_MESSAG

    Hi, Ours is a fresh installation.. When i am loading for the first time till PSA it is successful.. As HR data sources are 3.5 datasources, i am loading cube via infopackage.. When i start the load to cube it is giving me dump with exception CX_RSR_X

  • Adobe CS3 deactivation, computers re-installed without CS3 deactivation, how to reset licence key?

    Need help, we have CS3 Design standard licences, that have not deactivated just reinstalled computers and now I'm unable to active CS3. The maximum number of activations allowed for this copy of Adobe Design Suite standard CS3 has been reached. How c

  • What is the problem with Roxio Media Manager??

    I purchased my first Blackberry 8310 Curve on Black Friday. For some reason the Blackberry Desktop Manager installs and works absolutely fine. However when I open the media manager from Roxio the screen freezes and it doesn't even show my device. I h

  • Visual Web Developern 2010 Express

    I am trying to install the Web Platform Installer 5.0 so that I can download Visual Web Developer 2010 Express. It does not seem to be installing. It evidently is running, at least the task Manager says it is. I let it run all night, Probably a total