How to sent/recie​ve simple USB commands?

Hello,
Before I start. I've been reading om the internet (USB tutorials, nuggets, etc.) for the last 2 days to get this,
but it is really confusing and I still have no idea how to do this. So I'm asking for your help.
I setup a custom USB device in MAX.
I need to sent this command:    0x2 M 1 0x3
Were 0x2 defines the start and 0x3 defines the end of the command.
I think I have to use a control transfer, but I do not understand what to use at the Index, Value, Request Value,
Request and Length inputs. I also do not understand how to sent Hex, Dec and ASCII at the same time.
Do I need to convert these values?
I would really appreciate some example code. Can I use the VISA commands?
Kudos will be given, thank you in advance 
The Enrichment Center is required to remind you that you will be baked, and then there will be cake.
Solved!
Go to Solution.

Heinen wrote:
I need to sent this command:    0x2 M 1 0x3
I also do not understand how to sent Hex, Dec and ASCII at the same time.
Do I need to convert these values?
I am not sure about the Index, Value, Request Value,
But about sending your comand....
I assume the space before the "M" and the space after the "1" is not needed,
but the space between the "M" and the "1" is needed
Omar

Similar Messages

  • How Can You Create A Simple USB Driver

    Hello,
    I wonder if any one can help? I would like to try and build a simple USB driver for this devices http://www.maplin.co.uk/Module.aspx?ModuleNo=227123 I have no real experience programming for mac bar BASH scripts and a few AppleScripts. Could someone give me a few pointers to get started. The devices developer manual can be found here http://www.dreamcheeky.com/dream/forum/download/file.php?id=7
    Thank you,
    James

    http://developer.apple.com/referencelibrary/HardwareDrivers/idxUSB-date.html

  • How to use simple input command ??

    I am tired of trying to find an easy to understand source to implement simple INPUT command ( equivalent to cin>> and scanf() , in c++ and c as i m good in those two)
    when print can be System.out.println(--) , then y does read have to be so complicated ?
    Help me out guys !!!

    package palindrome;
    import java.io.DataInputStream;
    * @author Pulkit
    class Main {
    public static void main(String[] args) {
    int num;
    System.out.println("Enter a number to check if it is palindrome");
    // System.in.readline(num);
    DataInputStream ob = new DataInputStream(System.in);
    Now the remark line is wat i tried to do, as i thought it should follow the print method ( System.out.print ) that one.
    But in a book , i see its done just the other way, just below the rem line.
    I just need ur help to explain me as to how that line has been put, i.e. the syntax of that line.

  • How to read out data via usb

    Hello,
    i am trying to get the measurements of a dial indicator, "MarCator 1075", product of Mahr Co. via USB-Cable.
    I installed all the drivers and MAX shows that its a COM-Device and its working properly. So i configured the settings: baud rate 4800, data bits 7, parity even, stop bits 2, apllied and saved the changes.
    I tried those 2 attached VI's, but it doesnt work.
    1. basic_serial_write_and_read.vi is the standard VI for USB-communication of NI.
    2. Sylvac Read.vi is a VI the vendor send after i talked to him to inform me about the dial indicator. He said its a VI to get Data via RS232, but the problem is that i dont have a RS232-slot in my computer. In order to that i have to realize it via USB.
    I think it doesnt work because there are no databits to be read out. When the dataflow arrives the "VISA-Read" theres is an error. This occures in both VI's.
    Error -1073807339 occurred at VISA basic_serial_write_and_read.vi
    Possible reason(s): VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.
    Anyone who can help me with my issue??
    thx in advance
    best regards
    Attachments:
    basic_serial_write_and_read.vi ‏34 KB
    Sylvac Read.vi ‏22 KB

    Hello FCHansa,
    have you installed the proper drivers?
    Which version of LabVIEW are you using?
    Which OS are you working on?
    In the LabVIEW Example Finder you have a simple example how you can communicate to a USB HW via NI-VISA.
    It's called "Basic TCPIP or USB VISA Write and Read - PDA.lvproj". Or another would be "Basic TCPIP or USB VISA Write and Read - Touch Panel.lvproj"
    Have you configured your USB Device to a virtual COM interface?
    Also please have a look to these links:
    What is the Difference Between USB Raw Control and USB Raw Bulk?
    http://digital.ni.com/public.nsf/allkb/400D6EAB5CFE1C6B86257395005F5D48?OpenDocument
    USB RAW Controller
    https://decibel.ni.com/content/docs/DOC-2022
    Also, please follow the advises of smercurio_fc! As he said you need to know to which commands your Hardware is responding to.
    Best regards,
    Abduelkerim
    Sales
    NI Germany

  • How do I create multiple live USBs of Operating systems to boot from on one flashdrive?

    How do I create multiple live USBs of Operating systems to boot from on one flashdrive?
    I am attempting to create multiple live USBs within one flashdrive so that i can boot various operating systems without having to buy multiple USb sticks. I am using a Mac OS X Snow Leopard 10.6.8 Operating System currently. I am using the Terminal provided by the OS.
    I would like to try Debian, Kali, Precise Puppy, and Sabayon- with one space left empty for whatever Linux OS I would like to try next. I have partitioned an 8GB flashdrive into the following sections:
    name of intended OS,     space allocated for it:
    1)Debian ........................1.32 GB
    2)Kali..............................2.61GB
    3)Precise Puppy..............163.7MB
    4)Sabayon.......................1.77GB
    5)TBD..............................2.14GB
    I have figured out how to change the .iso files of the operating systems into .img files with the following commands:
    hdiutil convert -format UDRW /path/to/input.iso -o /path/to/output.img
    a .img.dmg file is created, this is corrected in the next line of code *please note: I am a a very beginner at programming, and would greatly appreciate any help. Thank you!
    mv /path/to/output/file.img{.dmg,}
    This is where I started to get confused:
    I entered diskutil list to find the location of the partitions on my flashdrive, and this is the relevant section:
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *8.0 GB     disk1
       1:                 DOS_FAT_32 DEBIAN               1.3 GB     disk1s1
       2:                 DOS_FAT_32 KALI                    2.6 GB     disk1s2
       3:                 DOS_FAT_32 PRECISE            163.7 MB   disk1s3
       4:                 DOS_FAT_32 SABAYON           1.8 GB     disk1s5
       5:                 DOS_FAT_32 TBD                     2.1 GB     disk1s6
    This is the code I attempted to use and the subsequent result:
    charles-burtons-mac-mini:~ charlesburton$ sudo dd if=/Users/charlesburton/Desktop/debian-live-7.2-i386-gnome-desktop.img of=/dev/disk1s1 bs=1m
    dd: /dev/disk1s1: Resource busy
    *at this point I went to the Disk Utility GUi and unmounted only the DEBIAN partition, now back to the terminal*
    charles-burtons-mac-mini:~ charlesburton$ sudo dd if=/Users/charlesburton/Desktop/debian-live-7.2-i386-gnome-desktop.img of=/dev/disk1s1 bs=1m
    dd: /dev/disk1s1: end of device
    1259+0 records in
    1258+1 records out
    1320005632 bytes transferred in 1011.966891 secs (1304396 bytes/sec)
    Please may someone help explain why I had a return value of +1 in my records in and how I can make it work properly.

    I would like to know the answer to this as well.  I tried renaming the 3D version by adding 3D after it, but it still not a separate movie in iTunes.
    It's putting them in the same folder.

  • How to access the mysql using ordinary command line in Azure Website?

    Hi
    I deploying Django project on Azure. I created project and MySQL db according this method: https://pytools.codeplex.com/wikipage?title=PollsDjangoSql . I can create tables using django command "syncdb" in Visual Studio. I see
    db structure in SQL Explorer. All works. But now I need to get access directly to mysql.  For example with a view to set encoding of some column, or set permissions, change user password, etc.
    I found about many different tools and methods in Microsoft portal. But the purpose of these tools, how to install it and how to use it is a very entangled (After several attempts to find out what's what two weeks later I found on my computer
    three dozen programs with unknown purpose. I doubt that I need to install so many tools to just add the user in mysql).
    How to access the mysql using ordinary command line (or the same simple tool) in my case?

    Hi pvgdrk,
    To get access directly to a mysql database, you can use the commandline tool(open a cmd window-->type mysql the commadline ) or the
    GUI MySQL workbench.
    Since this is a question about MySQL, I would suggest you post your question in a dedicated MySQL forum. You will get more prompt response.
    If you have any feedback on our support, please click
    here.
    Eric Zhang
    TechNet Community Support

  • How to stop the Debug-master-Beacon command from console

    Q: How to stop the Debug-master-Beacon command from console
    A:  
    -"Debug-master-beacon" This command is basically used to see the  master beacon  sent and the received .
    -This command will  help in figuring out master discover issues.
     -You can run this command only from the console of the Ap.
    - Once you run the command you can stop it only by typing the command
    "No debug-master-beacon"
    Sample command below

    Hi Shravanthi,
    How the Substitution will work for stopping the user from changing the Depreciation key in asset master data. Can you please ellaborate in details.
    Regards,
    BABA

  • I got 3.95GB available on my flash drive and need 4GB to reinstall lion osx how can i create space on usb using Disk Utility ??!

    I got 3.95GB available on my flash drive and need 4GB to reinstall lion osx how can i create space on usb using Disk Utility ??!

    What is the capacity of the flash drive?
    You might also be able to reinstall Lion without a flash drive, by booting up the computer holding the Command + R keys, and choosing Reinstall OS X.

  • How do I install windows from USB on Macbook pro 3,1

    How do I install windows from USB on Macbook pro 3,1 ?
    My Superdrive is far from super anymore, So I managed to make an extern drive with both Snow Leopard Partition, Lion Partition (Since I thought Boot Camp 4,1 would bypass my problem), and Time Machine partition, Since I got 1. USB drive that works.
    - My general issue is that Boot camp Refuse to see the USB drive - (Many "how to"´s though show how they install windows perfectly through the USB port, but they use airbooks!, and somehow the Macbook will not ?)
    I fix that issue with >> rEFIt <<, that suddenly makes it possible for the Mac to see the USB drive, and partitions.
    Which was very strange since I could use an extern HD with the whole installation to start up wipe the whole disk, and then use my extern drive with partitions to install Snow Leopard and get everything as before with timemachine. Very smart with timemachine, but very lucky that I have a extern drive that runs the whole system and that I made the partitionsdrive before. DVD-drives are the past!
    Point: So the original system could see the Snow Leopard installation USB disk, but boot camp cannot find the USB drive ?????????
    After rEFIt I booted and then I got this error:
    Starting bootmgr.efi
    Error: Unsupported while loading bootmgr.efi
    I read it could be a problem with the Windows software, so I purchased an extern DVD drive, Used Disk Utility to make an image (.DMG), then used another program to convert the .dmg to .ISO.
    Then downloaded a trialversion of vmWare fusion, and installed windows from the iso. Everything worked brilliant, except and that is why I want to use boot camp, Running windows in another program while running the mac system is a little hacky and slow.
    Point: Nothing is wrong with the windows software, and windows runs fine.
    I then downloaded the Windows DVD / USB Tool, reformatted a USB drive as Master Boot Partition, MS-Dos Fat partition, then after lots of struggling got Vmware, windows to recognise the USB drive. And installed the windows software on the USB drive, as all the walkthroughs recommend.
    Then I tried for "fun"! to just install windows form the extern USB drive, and with rEFIt it will see the drive and start to do something, but then when it starts to boot, the screen just turns into black and nothing happens, and you can see the drive does NOTHING. (I think it is because I only have 1 USB drive and the Extern DVD drive does not get enough power, but again the mac refuse to see the USB drive unless it is a Snow Leopard installation USB-drive!
    Well trying to install Windows Ultimate 64 Bit, which worked great in vmware, because that program installed from the .ISO file that I had on the desktop, but trying with Boot Camp did not get anywhere, what kind of **** program is this boot camp anyway!?, but then I try the new USB disk with windows made from windows, thorugh rEFIt, it sees the disk and then starts and then I get this ERROR:
    rEFIt - Booting Legacy OS
    Starting legacy loader
    Using load option ´USB´
    Error: Not found returned from legacy loader
    Error: Not found from LocateDevicePath
    (x 9 times)
    Error: Load Error while (re)opening our installation volume
    The firmware refused to boot from the selected volume. Note that external hard drives are not well-supported by Apple´s firmware for legacy OS booting
    (Hey Apple please send out a updated firmware that fix this issue?!)
    So how do I do it ? - or is the only option to fix the partition running the system from the extern disk. Format the whole drive in 2 from the "bottom" and install windows and then afterwards install Mac on the other partition ?  Or just run windows on the mac and forget about mac software ? What a stupid solution...

    There are strings in the pliist file to add other Macs so that you can use some USB-DVD drives.
    This is 5 page thread, so a little more 'meat' to it:
    https://discussions.apple.com/thread/3410900?start=60&tstart=0
    And on PC booting Windows from a USB DVD to do the install is usually a piece of cake, sometimes you just need to specify that USB in the BIOS boot order and sometimes select via F12 (or another Fkey) and that is it.
    What you have here seems to be everything and everyone is excluded unless there is a  mac-model device ID string that specifies yes.  An unnecessary hurdle.

  • TS2756 How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )

    How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )
    i know its not a problem whit my carrier o data plan or sharing preferences on the ipone because when i use it un my laptop it works perfectly through
    the usb and even works on the Imac through wifi and bluethood tethering but NOT through usb!!.
    the problem is that trying to make it work i deleted the "profile" usb iphone on the network prefereces panel. Now i only have 3 options: ethernet / wifi / bluetooth
    but not the usb iPhone i used to have.
    And when i try to add a new one i dont get a USB option.
    can some one help me please??
    this is how it looks (after the bluetooth PAN i used to have USB iPhone option)

    The question would be more appropriate in the Mac forums as it is not really related to the iPhone.

  • How to change "open with" defaults via command line?!?

    folks,
    i know that if i get info on a file -- in this case, a filemaker 5.5 file -- i can choose the default "open with" settings and apply those settings to all files of that kind. see the attached image for what i mean.
    but how do i do that via the command line?
    thus far, here's what i've got: i know that i can open a document called "scrubbing shell.sh" on my desktop WITH either MS Word of TextEdit by calling:
    open -a textedit /Users/david/Desktop/scrubbing-shell.sh
    or
    open -a Microsoft\ Word /Users/david/Desktop/scrubbing-shell.sh
    no sweat. BUT....how do i set the defaults so that it ALWAYS opens with that app in the future when double-clicking via the GUI?
    many thanks, ya'll!
    david koff
    associate systems admin
    the j. paul getty trust
    dkoff AT getty DOT edu

    Hi David,
       OK, I investigated the new format and treatment. It appears that the first entry in the property list file that matches the file being opened wins. The Finder may still honor the new format; when I moved my old Panther file into Tiger it seemed to work. However, in other ways, the Finder doesn't recognize the old format, which is the format of the FileMaker entries you posted.
       The Finder puts all of the new format entries at the beginning of the property list file. If you change a preference that was controlled by an old format entry, the Finder won't edit that entry. What it will do is to create a new entry in the new format closer to the beginning of the file than any of the old-format entries. SInce the new entry comes first, the old one doesn't apply. If you then edit the preference and change it back to what it was before, the Finder will edit the new entry. Consider the following sequence of events and commands:
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    I change all GIF files to be opened by GraphicConverter instead of Preview, which is an old setting in the old format.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <      <dict>
    <         <key>LSHandlerContentType</key>
    <         <string>com.compuserve.gif</string>
    <         <key>LSHandlerRoleAll</key>
    <         <string>com.lemkesoft.graphicconverter</string>
    <      </dict>
    Then I change all the GIF files to be opened by Preview again.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <       <dict>
    <          <key>LSHandlerContentType</key>
    <          <string>com.compuserve.gif</string>
    <          <key>LSHandlerRoleAll</key>
    <          <string>com.apple.preview</string>
    <       </dict>
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    408c408
    <          <string>com.apple.preview</string>
              <string>com.lemkesoft.graphicconverter</string>
       Note that I had to change the file to text after every change because the Finder converted the file to binary format every time it edited it. I didn't have to logout or reboot; the property list file change less than a second after the preference was set. I'm guessing that because you were just looking at the old-format entry, you missed the real changes to your property list file. Did it change from text to binary format? Try the command line tools that I used above.
       Note that this means that it matters where you put your entries in the property list file if you edit it.
    Gary
    ~~~~
       There are only 10 kinds of people in the world. Those
       who understand binary numbers and those who don't.

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How can i create a bootable usb sata for xp

    how can i create a bootable usb sata for xp

    Installing Windows XP on a portable USB hard drive is not supported.
    Carey Frisch

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

Maybe you are looking for

  • How can i make itunes on my laptop my home library without deleting all of my songs?

    I have already tried home sharing and clicking on manually manage music and videos but when i click that it tries to delete all of my music and i want to keep my music i just want to use my laptop instead of my other computer.

  • Employee Driving License details

    Hi folks   Is there any Infotype Available to maintain Employee Driving License details??? i need to maintain Driving License Number in master data(USA). Any Idea?? Thanks- Ramesh

  • HFM 11.1.2.3 error when unrolling a tasklist in favorites or tasklists

         Hi All, what can be a reason for such result when unrolling a tasklist: http://i051.radikal.ru/1308/7c/952afa06af8e.png I faced this just now and only for 11.1.2.3 version. Any guesses about the reason are appreciated. Thank you in advance.

  • No thumbnails in Project panel

    I have thumbnails turned on but nothing appears in the project panel next to the name of the file or in the preview window.

  • Cannot send pdf as and e-mail attachment

    I am having a problem.  We used GroupWise as our e-mail client and everyone had no problems clicking on the "Email" button in Acrobat Standard and a new e-mail came up with the pdf file as an attachment. However, we have changed from Groupwise to Exc