How send/read bits of information through visa

Hello people.

I bought an encoder that reads a tape of datamatrix and returns information such as x and y position and speed. It communicates via serial 485 and I need the control trought labview, I don't know how to do this. The communication protocol is to send a telegram of the request and received a telegram in response.

To send the request telegram has 2 bytes: one containing 8 bits of information plus one parity bit another byte has the parity bit and the same 8 bits of data in the first byte, but here they are reversed. For example octet1 is 110000100 and octet2 101111011 (it takes x position)

The answer telegram contains 6 to 9 bytes (all have 8-bit, plus the parity bit). The 2nd to 5th byte contains the x position, so I need to read and convert to a decimal number.

The issue is that visa works work with strings, so I don't really know how to properly convert the information of these 2 bytes to send the request, nor how to convert the string read from the instrument to the binary number and finally to decimal. Do you have any idea?

Greetings,

Vitor

Vitor Soares says:

I did the two arrays of bits, one for octet1 and one for octet2 and diverted these channels to channels and concactenated and sent to the encoder, but I got no response... I'm on the right track?

Partially. It is a frequently asked question. You need a single table of U8, containing the 2 bytes you want to send and then you can simply use Cast to Type or an array of bytes to a string for a string that you can subscribe to Write VISA.

Tags: NI Software

Similar Questions

  • How to upgrade my Quicktime 7 Player Quicktime 7 Pro? I am trying to upgrade the application Quicktime 7 and he continues to send me to this information page unrelated to an upgrade or buy and download option.

    I'm trying to upgrade to Quicktime Pro in the Quicktime 7 application and he continues to send me to this information page unrelated to an upgrade or buy and download option. How to upgrade my Quicktime 7 Player Quicktime 7 Pro?

    Unless you already have a QuickTime Pro key, you can't. Apple stopped selling them.

    If you do open it, choose recording in QuickTime Player 7 menu and put your key.

    (143612)

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How to read the 32-bit depth .bmp image

    How to read the image, 32-bit depth using LabVIEW .bmp?


  • How to read data from OM - 62 temperature/humidity data logger in LabVIEW?

    Hello

    I have an Omega OM-62 temperature/humidity data logger I want to communicate (initialize recording, reading/writing data, stop recording) through LabVIEW 8.6. The OM-62 is connected to the PC via a type B USB-miniUSB connector, and I have provided "Omega Recorder program Interface" on my Windows operating system. I called online DAQ support Omega but I was told that data recorders low level like this have not provided capabilities of LabVIEW, which I fully understand.

    My question is why I have to use their program to communicate to this device? If I knew the syntax program them used to connect to the device, why can't I use through VISA? Do I need to build my own LabVIEW driver from their supplied driver?

    Python is easier to apply to this scenario solution?

    How can I see the code "Omega Interface Progam recorder" on my Windows operating system is using to communicate with the OM - 62 sensor?

    I just want to know how this could or could not work because I think I'm missing some concept in my understanding of programming LabVIEW/novice. It would be easier to run my LabVIEW program and their program at the same time, but I just want to understand it at a deeper level.

    Curosity killed the engineer occupation,

    Zach

    P.S. I have attached a few driver configuration information, but I have no idea if this is useful.

    Unless the manufacturer provides a kind of programming interface or API to communicate with the device that you have trouble with your own software interface to it whether LabVIEW or Python or something else. This could be in the form of a driver dll, Protocol series modbus (etc. etc. etc.).

    If it is not condition / available and you really need to communicate with the device, you will need to look at using something like a sniffer USB/driver (software? hardware?) to try to intercept communications between their software and the device. You can then use this information to try to understand what the commands it sends and the responses received and how to convert data.

    Once you have that until now... I don't know what options are willing LabVIEW for control of USB device, but a proposal, I would say that you would need either a driver USB low level or you have to write your own driver in another language and that call from LabVIEW.

  • Why I cant remote AimTTi TG2511A func. General through VISA?

    Dear members,

    I bought the named device and installed the necessary drivers (latest versions) on my win7 64 bit PC.
    There is an example in the VI-s which should work fine, but it gives an error.

    When I try to open the input/output through VISA vi and send a * RST command, the unit shows REM when viewing, but does not reset itself. So do not even VISA and not even the factory examples work...

    Can give you advice, what to try to fix this problem? I still keep in touch with the factory, but not all the tips. They tried, it works for them.

    I think, there are some conflicts of pilot, or maybe some of them work properly with older versions.

    Thank you very much!
    Zsika

    Did you read my response? You may not send any character endpoint. Add the same character MAX uses (probably \r) with the constant string formatted correctly and try again.

    You must also include the function VISA configure Serial Port in your code. You can also consult the advanced feature of series to see how to automatically add the stop character. The basic example should also be considered. This example has the control of the chain properly configured to send to '-' codes.

  • How to read continuously from the rs232?

    Hello

    I'm new to LabVIEW and my questions would be obvious for some for you. So please help if you know the solution.

    It's for my school project. For your information, we need to schedule a Committee of Altera DE2 to control traffic lights (something like that) and at the same time, the Commission shall forward the States of enlightenment to a computer with LabVIEW installed via an RS-232 cable.

    The rest of the project was fine except for the part of LabVIEW, because as I said earlier, I'm new to LabVIEW.

    We use the "basic series write and Read.vi" in the folder examples of NEITHER. The problem is that we do not know how to change the vi in order to receive the data that come the DE2 Board permanently. Each time, the vi stops reading after receiving 24 bytes of data.

    So, the first question is:
    1.) how to read continuously from the RS-232 port? (We tried to use while "loop" but without success, maybe we were doing it the wrong way.) If you know the solution, please enlighten us for us in a detailed manner.

    (2) Secondly, once we have received the 'chain', how can convert us to bits (0 and 1) so that we might be able to manipulate the bits, for example turn on the LEDs that correspond to the bits.

    Thank you.

    Instead of reading the bytes of the port so to read that many bytes (which may be zero), just do a VISA read for 1 byte.  He will wait for this next byte.

    To get an array of Boolean out of this byte, use this code.  He turns the characters into a byte array.  Takes the first and the only element of this array, and then converts this single U8 number into an array of bytes.

    Which country are you?  I've never seen or heard lights orange before.  Only the yellow lights.

  • How to read the tag bluetooth data in labview 2015 running on Windows 10

    Hi all

    I have a Development Board Nordic semiconductor nr51. This card is programmed as a tag bluetooth which simply announces his address with 16 bits of data appended to the end.

    My laptop came with loan materials smart bluetooth. I installed an app interactor lighthouse to bluetooth on my laptop and the software is able to detect the tag as if shown on the image below.

    I wanted to write a LabVIEW program that will simply be careful bluetooth headlights and notify me in my computer every time a lighthouse with the specified address is detected. This mobile application below is provided by the manufactuerer of the Board of Directors and I wanted to develop a LabVIEW program something similar to what will read the given data and extract values.

    Somehow, all the sample applications provided data only shows how to read and write in a connected bletooth device but not analysis for tags. I also tried using the Bluetooth ' discover ' and it does not detect the bluetooth beacons.

    Could someone provide me with the necessary information or example program for detecting / reading of tags bluetooth in LabVIEW 2015 running on Windows 10?

    Do I need to install a third-party software to read data from bluetooth?

    Bluetooth in LabVIEW function nodes using the Winsock interface to access bluetooth resources. This works very well for Bluetooth 2.0 devices but not Bluetooth 4.0 devices WHEAT aka. Microsoft has created a completely different interface for these resources API as the model of overall service for WHEAT devices has radically changed.

    The API to use WHEAT devices is the API of the GATT (generic attribute profile) in Windows. There is supposedly a .net interface available that you can try to use (Windows.Devices.Bluetooth.GenericAttributeProfile). The WinAPI to lower level (https://msdn.microsoft.com/en-us/library/windows/hardware/hh450825(v=vs.85).aspx) is a C DLL API and does not lend at all to be called directly by the LabVIEW call library node, since some of the parameters of the function are quite complicated and you need to also access the SetupDI APIs to enumerate resources WHEAT and even harder to function parameters. In order to access this low-level API to write an intermediate DLL which results in low level API C a more acceptable API for LabVIEW.

    Another possible problem is that Windows don't at least in Windows 8 not allows devices to pair per program. Microsoft wanted to force developers in the use of the "inbox" experience, which means that all users must go through Microsoft provided service pairing, instead of each request for implementation of his own matching technique.

  • How to read the report of the unit for HP Deskjet 1510

    Hi HP.

    I see the software provided with this printer, it has this option to print the reports of the unit.

    Please help on how to read this report because it consist of unknown coding and other things.

    I would be grateful if your side can help me on this coz I guess we can follow our consumption through this report.

    If this isn't the goal, maybe you can suggest another way to get understandable use of reports?

    Kind regards

    Nadiya

    Hello Nadiya,

    Welcome to the forums

    I understand that you are looking for a usage report. The printer prints a test page and you can see the number of pages on this page, as well as information about the printer, such as serial number, etc.. If there is anything else that can say 'use' it please let me know and I'll do my best to help.

    Click on this link: streaks of ink, fixing faded prints and other common print quality problems

    In the guide, look under "Solution 6: print and evaluate a page of test and troubleshooting of faults" and print a test page.

    Take care

  • How to read a file of all the text in a pl/sql variable?

    Hi, I need to read an entire text file - which actually contains an e-mail message from a system of content management - in a variable in a pl/sql package, in order to insert the database information and then send the email. I want to read the whole of a sudden text file, no not one line at a time. Shoud I use Utl_File.Get_Raw or is there a more appropriate to do this?

    How to read a file of all the text in a pl/sql variable?

     ...
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....
    
  • How to read a play list in iTunes (macOS Sierra)

    I just want to play a playlist in iTunes (version 12.5.1.21). Can someone tell me how to do this without going through several steps? It seems impossible that there is no way to play a playlist, so I think I missed something obvious.

    I note the button 'Shuffle All' (the right side of the screenshot below). But I don't want to mix the playlist. I just want to play. I watched and clicked around in the interface and searched online, but I can't find the location of the play button.

    I thought that maybe they made a strange decision to bury the play option in the menu «...» "on the far right, but there is no option of reading it. (I know there are options of this menu next 'Play' and 'Play later', but none of these options now lets list).

    (To note that by clicking on the cover album opens a pop up to change the image. I think a button play here would be better suited to 99% + use cases and it would be also compatible with the play button that exists on the cover art when you browse albums.)

    Yet once, does anyone know how to play just a playlist (not random) without going through several steps?

    Click on any song in the playlist and it will play from this point

  • Hey how to read mi whatsapp messeges on mi iwatch?

    Hey how to read mid messegges on mi iwatch whatsapp?

    Hello

    Your Apple Watch can be configured to replicate notification of WhatsApp Messenger from your iPhone alerts:

    -On your iPhone, in the application of Eve, go to: My Watch (tab) > Notifications > go to the list of applications > turn on the button next to WhatsApp Messenger.

    However, WhatsApp WhatsApp Messenger Messenger doesn't offer not currently support Apple Watch, is not currently possible to reply to messages on Apple Watch WhatsApp.

    When the developer adds support for Apple Watch, description of the application in the iTunes Store / App Store will be changed to include the wording: «Offer Apple Watch App for iPhone»

    You can contact the developer to suggest they add this feature:

    https://www.WhatsApp.com/contact/

    More information:

    https://iTunes.Apple.com/GB/app/WhatsApp-Messenger/id310633997?Mt=8

  • How to get the .rbf and .through files?

    Hello I am currently working on the project, which provides for automatic deployment and launch programs everchanging.

    Ev3 are scattered in different schools. I wrote a simple script that can download a file and then send it to ev3 via wifi.

    But I'm currently stuck on how to get .rbf and Labview .through files.
    I know that I can deploy .vi using the target to ev3 and then upload these files to the PC, but I can't add script.
    Is it possible to compile .vi to the file?

    Sorry, try this

  • How to read the status of User1 DIP-switch with a cRIO FPGA chassis?

    How to read the State of the DIP switches on a FPGA cRio chassis?

    I work with a cRIO 9022... My idea is to put the system in "service" mode with USER1 switch to IT and communicate with the FPGA via the FPGA - GUI (VI) on the host computer instead via the RT module that is used in normal conditions.

    Any ideas? Unfortunately, I don't have an unused channel on the left... .and (as I know) cannot use the interface RS232 of FPGA.

    Many thanks in advance,

    Luke

    Hi, this is the correct information. You cannot read the FPGA of DIP-switch status. The only thing you could do is to use the function of Reading Switch.vi located under the range of functions-> real-> utilities RT time

    It's how you probably know side host RT and not the FPGA.

    Cordially Virginia

  • How to read the value of list boxes by iteration in a loop For?

    I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.

    Any information would be welcome. Thank you!

    su27 wrote:

    I have a lot of combo boxes on the front of my VI [...]

    Be sure to close the references that you have finished with them.

Maybe you are looking for

  • The user migrated but not up-to-date on the NAS

    Hello, I've migrated 3 accounts but the last of them was not updated on the NAS. When I check the actions, he stills appears the username and not e-mail as those migrated. I tried to delete the e-mail for this user shared folders on the portal readyc

  • 3.5 numbers formula "name of the journal.

    He continues to be for me that I need to access the name of a worksheet in a formula. The standard solution in Excel is easy to find in several focus groups. = Right (Cell("filename",a1), Len (Cell("filename",a1)) - Find ("]", Cell ("filename", a1),

  • IX2 with SSD

    Hello I write about the Storcenter ix - 2 possibilities. The ix2 could manage the SSDS? In this case, are there templates recommended by Lenovo? We tried to connect to a couple of Toshiba SSD Q300 and did not work. Thanks in advance

  • Drivers for USB 3

    I have a new HP Pavilion PC 500-324. I got the Windows 7 operating system because I hate Windows 8. And now I can't the 3 USB ports to work. I tried many drivers HP. Error messages ranged from "The operating system not supported" and "No access" to t

  • Video download on e280 (version 2)

    I have sansa for about a year and I still he can't figure out how to convert a video to sansa. The video plays on screen overview of the Media Converter. But when I disconnect the sansa, video will share 'Picture' and he told me to use the Media Conv