Breaking Specific Bits/Bytes off Hexadecimal LIN Signal

Hello All,
I am currently working on implementing a LIN-Analog Converter in Labview, and in order to do so I must break off a specific set of bits and convert these to decimal format.  The VI currently breaks off the first 8 bits and converts them to decimal, however I am a bit confused on how to modify this for my present needs.  I need to break off the "3rd and 4th byte pairs" (i.e. bits 17-32).  This point may be illustrated more clearly in the attachment entitled "Bits of Interest".  Furthermore, my current VI is attached to this message.  Any assistance would be greatly appreciated!
Regards,
Colin
Attachments:
Bits of Interest.jpg ‏15 KB
LIN_IBS_WORKING.vi ‏86 KB

In your case, you only care about specific bytes.  This makes like really easy.  Here are two possible solutions for this.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Get U16 from String Data.png ‏13 KB

Similar Messages

  • How can I set specific bits in a 16-bit integer?

    Hello everyone,
    as the title says I need to modify or rather to set a specific bit in a string which then is sent to a motor. I need to be sure that my command is correct as I am experiencing troubles with that motor and need to identify if its source.
    First of all my strings have to be in the Little Endian order. Then the structure of the string should be the following:
    Change Velocity command ‘V’xxCR 056h + one unsigned short (16-bit) integer + 0Dh (Note: Uppercase ‘V’)
    Note: The lower 15 bits (Bit 14 through 0) contain the velocity value. The high-order bit (Bit 15) is used to indicate the microstep-to-step resolution: 0 = 10, 1 = 50 uSteps/step.
    Until now, I used Flatten To String to convert 32 bit integers into bytes of the correct order. I thought I could use the Join Numbers function, but that only works for at least 8 bit numbers and there is no "1 bit number". I searched for an option to build a a string and set the bits via a Boolean Cluster, but I did not really understand how to transfer this to my problem.
    How can I build up the correct 16-bit integer (e.g. set the velocity to "10000" with a resolution of 50 µSteps/step)
    I would like to add the "V" and the CR via Concatenate Strings to the 16-bit integer, but other possibilites are also welcome.
    I have seens the examples for bit manipulation in C-code, but I wish to do this with LabView as I am not familiar with C,matlab and so on.
    Thank you very much for your help!
    Solved!
    Go to Solution.

    You really need to learn Boolean logic and how to shift bits around.
    AND is really good for masking out bits (forcing them to 0) and OR is really good for adding bit values.  Then Logical Shift is used to get the bits in the right places before doing the AND and OR.
    NOTE: Rate is an enum with 10 being a value of 0 and 50 being 1.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Bit Packing.png ‏15 KB

  • HT3180 My apple tv box no longer turns on, the white light constantly flashes on and off but no signal to my tv. All devices still pick up airplay but not actually playing. Restoring the box has made no difference, any clues?!

    My apple tv box no longer turns on, the white light constantly flashes on and off but no signal to my tv. All devices still pick up airplay but not actually playing. Restoring the box has made no difference, any clues?!

    Was the restore done via iTunes?
    http://support.apple.com/kb/HT4367?viewlocale=en_US&locale=en_US
    If so then you may need to take it to Apple.

  • How can I retrieve specific bits of data from iCloud?

    Some of my notes that I have saved before were deleted and so I want to retrieve them from an iCloud backup that was saved a week ago. Is there any way to retrieve specific bits of data like this from iCloud?

    Is there absolutely any way I can get the information back at all, even calling an Apple tech guy could maybe help to solve this problem since my info was stored in iCloud.

  • Is it possible to turn off the wireless signal on the Airport Extreme?

    Is it possible to temporarily turn off the wireless signal being emitted from an Airport Extreme whilst still remaining connected to the internet via ethernet? If so, what do you need to do to turn off the wireless signal?
    Also, how strong is the wireless signal? If placed in a basement of a residential property, is it likely that the signal would reach two floors above?
    Thanks very much for your answers.

    Welcome to the discussions!
    Is it possible to temporarily turn off the wireless signal being emitted from an Airport Extreme whilst still remaining connected to the internet via ethernet? If so, what do you need to do to turn off the wireless signal?
    Open AirPort Utility - Click Manual Setup
    Click the Wireless tab located just under the row of icons
    Wireless Mode = None
    Update to save your new settings
    You can reverse the process to turn the wireless back on when you are ready.
    Also, how strong is the wireless signal? If placed in a basement of a residential property, is it likely that the signal would reach two floors above?
    It's just not possible to accurately predict wireless performance in advance for any installation. A guess would be that the signal will be very weak, and likely unusable, but you won't know for sure until you try it out in your house.
    Message was edited by: Bob Timmons

  • How do I get the $25 month2month "More Everything" discount on my off-contract lines?

    I have the pop-up discount automatically added when I logged onto My Verizon, but it is not adding it to my second off-contract line.  Please fix that for me.

    Never mind I was able to finally get onto live chat and they confirmed my eligibility and applied the discount.

  • Turning off the Wireless signal light on front of router

    Is there a way to turn off the wireless signal light on front of router that constantly flickers when using wireless, want to know this so i can use wireless without being recognized.
    Thanks

    Put an electrical tape over it.

  • I bought Logic Pro 9 in May and haven't had time to use it... And now they have Logic Pro X. Can I get a refund and buy X? I feel a bit ripped off as it stands now.

    Can someone help? I feel bummed and a bit ripped off.  I'd like to have Logic Pro X now, with all it's nice new features. I bought Logic 9 in May and haven't had time to even look at it. You think apple will offer people like me a refund? I hope so. I just don't feel it's right to charge so much for the upgrade.

    mende1 wrote:
    Welcome to Apple Support Communities
    Apple offered a refund for users who purchased Logic Pro 9 30 days or less before the Logic Pro X launch, but they don't do it anymore, so if you want to upgrade to Logic Pro X, you have to purchase it in the Mac App Store
    Part of this is incorrect...
    Some App Store employee's "accidentally" (but in good faith) issued refunds to a few users who had purchased Logic 9 within 30 days prior to the mid-July release of Logic-X. Word quickly came down from Apple HQ that this was against App Store policy and the practice was immediately stopped.
    To the original poster.. you never stood a chance, even if they were issuing refunds you didn't fall within the 30 day period.  There were many who purchased Logic 9 a few days before the LX release who did not get a refund.

  • Hp office jet 6500e709n running on windows 7 64 bit goes off line every few days.

    This printer worked fine on my wireless network when I was using Windows XP.  Now that I am using Windows 7 64 bit everytime I turn off the computer it goes off line.  I have to reconfigure it which knocks me off of my wireless network and I have to turn my router off and on to reconnect and sometimes the printer is back online and sometimes not.
    Any suggestions would be apprecciated.

    Have you tried the Updates on this page: http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4063&lc=en&cc=us&dlc=en&sw_lang=&product=3795...
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Bits, bytes, and all the rest

    I need clarification on what some stuff really represents.
    My project is to build a Huffman tree (no problem). However, all tutorials and examples that I can find on the net take from a text file with the format <letter> <frequency>, such as:
    a 12
    b 3
    c 4
    d 8
    Mine has to read any kind of file, such as a text file.
    For example, if myDoc.txt contains:
    This is my document.
    I have to have my program read the bytes from the infile, count the frequency of each byte from 0 through 255. Then the frequencies must be placed on a list of single node Huffman trees, and build the tree from this list.
    I think I am having trouble because I just cannot get straight what a byte "looks like". My project says ensure you are not counting the "letters" of the infile, but the "bytes".
    So what does a byte look like? When I read in the file as above, what is a "byte" representation of the letter T, i,h, etc?
    Any ideas?

    Ok, Roshelle....here is a little history lesson that you should have learned or should have been explained to you by your instructor before he/she gave you the assignment to construct a Huffman tree.
    A bit is a binary digit which is either 0 or 1 -- it is the only thing that a computer truly understands. Think about it this way, when you turn on the light switch, the light comes on (the computer sees it as a 1), when you turned the switch off, the light goes out (the computer sees it as a 0).
    There are 8 bits to a byte -- you can think of it as a mouthful. In a binary number system, 2 to the power of 8 gives you 256. So, computer scientists decided to use this as a basis for assigning a numerical value to each letter of the English alphabets, the digits 0 to 9, some special symbols as well as invisible characters. For example, 0 is equivalent to what is known as null, 1 is CTRL A, 2 is CTRL B, etc...... (this may vary depending on the computer manufacturers).
    Now, what was your question again (make sure that you count the byte and not the letters)?
    As you can see, when you read data from a file, there may be characters that you don't see such as a carriage return, line feed, tab, etc.....
    And like they said, the rest is up to the students!
    V.V.

  • Bits, bytes and megabits

    In telecommunications (data rates) 1,000,000 bits in a megabit, apparently.
    In computing (file size)  1,048,576 bytes in a megabyte, apparently (1,048,576 bits in a megabit)
    There are different names available to distinguish them (e.g. kibibit/kilobit) but apparently, these and similar are often not used. Result? Confusion. http://en.wikipedia.org/wiki/Megabyte
    I suspect that quite a few people don't realise this - I didn't. Makes a difference when you are trying to check your upload and download speeds and verify BT's claims about their speeds. 

    The way I do it is X the results on speedtesters that give results in kbps [something like 74500/15500] by 1024.
    The fake results above would be 74500x1024 = 76288000Kbps which = 76.28Mbps [approx 76.3Mbps] which is very near the line max after overheads.cool.
    74954kbps = 76752896Kbps = 76.7Mbps
    15207 = 15571968Kbps = 15.6Mbps
    these are my actual readings.

  • Turn off dual line ringing on spa509g

    Hi,
    I have a UC540 installed with 12 spa509g handsets.
    The customer wants to know if dual ringing can be turned off on the SPa509g handsets.
    The customer wants to give the caller a busy signal or voicemail when there is a second caller.
    Kind Regards
    Ray

    The only way I have found to do it is through the GUI or command line.  CCA does not support silent ringing.
    Ryan

  • Keyboard shortcut to toggle a specific layer on/off regardless of what layer you are on?

    I just recently discovered the keyboard shortcut for toggling the current layer on and off and it is an incredible time saver.  Is it possible to create a keyboard shortcut dedicated to toggle a specific layer on and off regardless of what layer I am working on?  I use Photoshop for painting and I'll have a layer set up like an overlay, with my line drawing set to Multiply blending mode at about 25% opacity.  However, as the painting progresses, I need to turn that layer on and off continuously to be able to see my painting without the lines overlayed.  I know I lose a lot of time having to go over and turn the eye off and then back on over on the layers pallete.  I've tried setting something up as an Action, and had a shortlived success, but when I added new layers or moved them around after setting it up, it stops working.  I have to say, it was my first attempt at creating an Action of any kind, so there may be a way to keep it working regardless of what I do to the other layers, I just couldn't seem to figure it out.   Having the ability to somehow dedicate a key for quick toggling of my drawing layer would be another tremendous time saver.  I've looked around and have not been able to find anything on this subject, so I apologize if it's already been covered.
    Any help or ideas would be greatly appreciated!
    Thanks!

    Thank you so much for your quick reply.  I haven't heard of Scripts before, so I will definitely look into that.  I've only really been using Photoshop for a little over a year and  I can see there is much to learn.
    Thanks again for your help!

  • How do I open a PDF to a specific page via the command line?

    Several questions about opening PDFs from the Mac OS X command line:
    1) How do I use the "open" command to open a PDF to a specific page? (I know I can open a document via: open doc_name.pdf)
    2) How do I use the "open" command to pass multiple arguments (page no, zoom scale, view mode, etc...) to open a PDF file in a specific manner?
    3) Does Preview handle the same parameters as Acrobat Reader? If not, what are the differences in options?
    I've spent hours searching for this answer and have come up dry. I've downloaded Adobe's "PDF Open Parameters" document -- it lists all of the parameters I need, however I can't get any of them to work from the command line.
    My goal: Open a PDF from the command line to a specific page. At first glance, I thought this would be simple to do and find -- however, after a lot of searching I haven't found an example on how to do it.
    Anyone have any experience doing this, and care to share?
    Much appreciated! ---> Kelsey

    I don't know of any way to do what you want using the 'open' command. It can probably be done with Applescript, which you could call from a shell script. The Preview application doesn't seem to be scriptable. I don't use Acrobat, so I can't tell you anything about that. Looking through the dictionaries of the apps I do have, it seems that Skim (another PDF viewer) has an AS 'page' class. Below are a couple of links that may get you started. Look for more specific guidance in Applescript forums.
    http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=AppleScript
    http://links.tedpavlic.com/shell_scripts/skim

  • C6100 cuts off bottom line when printing from office 2010

    i even moved the line up on the word 2010 document but it cuts off some of the words.

    Sorry that you are experiencing this issue. Here is a link that may assist you with this problem.
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=...
    Let me know if this helps. 
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

Maybe you are looking for