Communicating with a non-message based instrument serially

The device I need to communicate serially with isn't message based. It is controlled by specific sequences of bytes. I'm assuming the best way would be to use VISA somehow. Anything that would point me in the right direction would be great, Thanks! I'm using Labview 5.1.1

The first thing to do is don't freak with things that don't communicate using human-readable strings of bytes. Bytes is bytes--just some of them we interpret as letters and numbers. Computers don't care one way or another...
Ok, with our existential philosophical digression set to one side, in the past when I have had to do this sort of thing I found it easiest to build my command sequences as arrays of U8 values. This is good because you can set the array indicators' radix to hex and see that the sequence of bytes is what you are wanting. Then to send it all you have to do is convert the array to a string using the "Byte array to string" function and send the resulting string to a VISA write. There is no special routine for writing 'binary' data becau
se, as I said before: Bytes is bytes...
The only thing that might get tricky is if the communication protocol requires some sort of wierd handshaking. One time I had one where the first byte of each message ahd to be sent with odd parity and then the rest of the message with even parity.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How to write programs for selfdeveloped message based instruments?

    I developed a message based interface by myself, but I have no experience of developing instrument drivers with Labwindow/CVI. I want to know which commands will be sent to the instruments when power up? It's very strange that when I plug in my instrument, the light of Access of resource mamager keep on lighted and the HP-VISA Assistant can't recoganize all the instruments in the mainfram. I want to know how to let my instrument be recoganized by system. Thank you very much!

    What is the VXI controller for your system? What VXI driver is running on the system? You mention HP-VISA, is your VXI controller and driver from HP or Agilent? If so, you will need to contact them on how to get your instrument recognized and working in the system.
    To write your instrument driver, I would recommend using VISA commands. Message based instruments have sets of specific commands that they respond to. Generally, one would have to look in the documentation for that instrument to determine the instruments commands.

  • Problems Communicating with non-NI hardware which previously worked!

    I am currently carrying out a project with which I am using LabVIEW 7.1 involving communication with a non-NI board. This has proved succesful until I moved the system to another desk, (which had already been done a couple of times with no problems) and now I have moved it to its origional location. The system components have not changed, and the VI has not changed but now when I run the programme the error 'Error -1073807346 occurred at VISA Open in without graph2(backup4)..vi'   with the possible reason given as 'VISA:  (Hex 0xBFFF000E) The given session or object reference is invalid'. I am insure what the problem may be, and have checked all connection leads, and ensured that the interface card is still securely fixed in the PC!
    Please Help!!
    David D

    Thanks for the advice!
    Unfortunately it was a computer virus that had got into the system. It is ok now though,
    thanks again,
    David D

  • Non web-based to-do list

    I don't have wireless access to the internet all of the time yet would still like to be able to manage a to-do list on my ipod touch. Any suggestions? All of the apps online seem to be web-based.

    Create a dummy contact and put your to do list in the notes section. Or wait until after February (when the Software Development Kit will be released) and see if anyone comes out with a non-web based To Do app.
    Personally, I go with the small paper notebook....

  • Can I use RS232 library for RS485 communication? Alternatively, can I use NI Serial with non-NI 485 boards?

    Hi-
    I have successfully used RS232 library to communicate with one RS485 device.  I now have multiple devices using the same Rx and Tx lines.  Three of the 4 devices have their own dll and can communicate effectively despite each other.  My problem occurs when the one device I am talking to using the RS232 library now has to share the lines with the other devices.  Are there any ways around this? All I can think of is to see if I can use the NI Serial library commands with my non-NI PCIe card.  OR, buy the NI 485/422 card and use the NI Serial commands.  Any other suggestions? 
    Thanks.

    The fundamanetal difference between RS232 and RS485 is the ability to connect to multoiple devices. The devices also normally work in a "speak only when spoken to" mode and this is achieve by adding a device address in the protocol. The NI serial library is oblivious to most of this and doesn't care if it's RS232 or RS485. The problem with your 232 device is that it will speak everytime when any other device is adddressed, so you should make it comply to 485 standards. This can be done with RS232 to RS485 convertors. You can do a search on Google for this. The ones I use and have the least amount of problems with is either from Advantech (<http://www.advantech.com/products/search.aspx?keyword=RS-232#search> and <http://www.advantech.com/products/search.aspx?keyword=RS-232#search>) or BB Electronics. (<http://www.bb-elec.com/Products/Serial-Connectivity/Serial-Converters/Port-Powered-RS-232-to-RS-485-...>)
    Best Regards
    Jattie van der Linde
    Engineering Manager, Software & Automation
    TEL Magnetic Solutions Ltd

  • I connected my iPod to my PC and got a message 'The software for communicating with the iPod is not installed correctly.

    I connected my iPod to my PC and received a message box that read "The software for communicating with the iPod is not installed correctly.  Please reinstall the iPod's software."  Not sure what I need to do.  I did uninstall all of my iTunes and related software components and then reinstalled the latest version of iTunes but that did not correct the problem and I now can't access my iTunes library at all.

    Another thing is that iPod Touch shows up fine...I've tried every other ipod from older 4gig Nanos to 120gb Classics and none of them work..this is really annoying!

  • I'm having trouble communicating with a transducer (Keyence LS-3100 laser scan micrometer) via the serial port. It works in Hyperterminal. Any suggestions?

    Its not a simple baud-rate or parity error. If I issue the command to send data (X1) in hyperterminal I start to get data. If I then switch to Labview I still get data. However if I try to issue the send-data command via Labview I get nothing (i.e. I can read from the device, but not write to it).
    I am on a Windows 98 (version 2) PC, running Labview 5.1.1

    Try adding a carraige return to the end of your command.
    "djb" wrote in message news:[email protected]..
    > I'm having trouble communicating with a transducer (Keyence LS-3100
    > laser scan micrometer) via the serial port. It works in
    > Hyperterminal. Any suggestions?
    >
    > Its not a simple baud-rate or parity error. If I issue the command to
    > send data (X1) in hyperterminal I start to get data. If I then switch
    > to Labview I still get data. However if I try to issue the send-data
    > command via Labview I get nothing (i.e. I can read from the device,
    > but not write to it).
    > I am on a Windows 98 (version 2) PC, running Labview 5.1.1

  • VXI Register-based versus Message-based Device Communications

    DAQ application using LabView 8.6 communicating with VXI chassis with multiple cards (both register and message based devices).  Register-based devices randomly stop communicating (after many hours at 200 scans/sec) while message-based devices continue to communicate.  Currently searching for the cause and a resolution to the problem.

    David,
    Thanks so much for your response.
    Our application (after initial setup and configuration of data communication cards in  the 2 VXI chassis) enters an overall loop which contains many separate individual loops which carry out the data communication with the various individual cards.  Some of these individual loops contain counters which increment each time through the loop.  This overall loop continues until the operator interrupts it.  We have been running the executable of the code so when we encounter the problem it is difficult to get much in the way of details of what's exactly happening.  We are now planning on running the source code so if the problem occurs we could possibly get more information about what is happening.
    1.  By stop communicating I mean that the some of the counters that I mention above go to zero which indicates that particular loop is somehow "hung-up" and not incrementing the counter. 
    2.  When we encounter the problem we have to exit the program, reboot the computer and start the program again.  We have to reboot the computer because after the problem occurs we try to run Resman and we get the error "Unable to initialize ni-vxi driver".  I researched this error and found information in the Resman Troubleshooting Guide which mentioned the possibility of a conflict between the NI-VXI device driver and some other memory resident program or device driver.  The guide recommended adding lines to the config.sys and system.ini files to exclude the VXI device driver region of memory (0xD000 - 0xEFFF) from other device drivers (MS-OS).  We did this but we still had the problem.
    3.  We have not tried changing the scan rate (currently 200 scans/second) for the cards but the problem occurs at very random times (anywhere from a few hours to 24+ hours).
    V/R,
    Craig

  • When I update apple driver, a pop-up error message "The folder you specified doesn't contain a compatible driver for your device. If the foldre contains a driver, make sure it is designed to work with Windows for x64-based systems."

    When I update apple driver, a pop-up error message "The folder you specified doesn't contain a compatible driver for your device. If the foldre contains a driver, make sure it is designed to work with Windows for x64-based systems."

    Hi,
    Please also check Event Viewer if it identify this problem.
    In addition, also check Device Manager, if similar driver already installed, try to uninstall them and reinstall new driver again for test.
    Roger Lu
    TechNet Community Support

  • I get an error message when trying to install windows 7 on my macbook pro. The message says "windows has encountered a problem communicating with a device connected to your computer. I don't have anything connected to my computer. How do I fix this?

    I'm trying to install windows 7 on my macbook pro. I went through the process of bootcamp telling it to install windows 7. Once the windows boot manager started an error message came up. The error message says " windows has encountered a problem communicating with a device connected to your computer. I don't have a usb connected to my computer. I  am using windows 7 professional install disc. I  can't figure out what i am doing wrong. The same message keeps coming up over and over. Am I doing something wrong or is it something else?

    Well, shucks, i just spent almost 30 minutes trying to find your model user guide to explain it better, I guess they never got around to making it.....
    I would just borrow another Windows disk and try installing it again and if it does it again then you might take it to an Apple Store and see if one of the "Genius' " can figure it out.
    Make sure your internet is enabled and click on your blank desktop and at the top of your screen is a Help menu option, enter PRAM and it should give you a list of things relating to Pram. It may take a few seconds to list anything as it has to connect to Apples severs first. It should list the things you may have to fill back in when your done.
    "P-ram" stores some common information that is used in the background, your date, time, startup disk, etc, that you don't have to re-fill when you restart, it's a little different for each computer.

  • I get an error message when trying to sign into the support community with another Apple id. On the pick a username screen I get "an account utilizing this address already exists...." despite trying a few usernames. Anyone know how I can resolve this?

    I get an error message when trying to sign into the support community with another Apple id. On the <pick a username> screen I get "an account utilizing this address already exists.Only one account per email address is allowed on the Apple Support Communities" despite trying a few usernames. Anyone know how I can resolve this?

    This problem has been driving me demented. The instructions that Ivan gives have partially worked for me. By following his link
    "How to find out if you have multiple Apple IDs" I was able to identify that yes I did have two apple accounts using the same e mail address. One was very old that I used to use for the forum boards and one is my much more recent ID that I use for everything these days. So I changed the e mail address for the old account which is associated with these discussion boards and that's the account that I am now posting this from. However even though the two accounts now have different e mail addresses when I try to log onto the boards with my more recent main apple ID I still get all the same errors as described at the start of this thread by rodgers_j. And of course that's the one I want to use so that I only have one itunes account for everything.
    So if anyone has any more hints I'd be very grateful.

  • Error Page with my own Error Message based on table

    <p class="MsoNormal"><span style="" lang="EN-AU">Hi All<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">I want to share my code (based on Apex_Lib code. Thanks Patrick) , maybe can help somebody else<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">Purpose: Replace the DB errors messages ( i.e ORA-00001- primary constraint ) with my own Message fetched from a table.<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">Components: 4 components<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">1. Java Script function ( MyErrorPage )<o:p></o:p><br>2. My Custom Error Page Template<o:p></o:p><br>3. Application item ( you can use any item )<o:p></o:p><br>4. Application Process ( getErrorMsg )<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"> 5. My Error Table.<span style="">  </span>( Provided just as example )<o:p></o:p><br>6. Display example<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"> Integration:<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"> 1 Identify your Error Page Template and Go there. In my case for example is LOGIN<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">1.1 Under Definition / Header. <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"> Copy the follow JS<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"> &lt;script type="text/javascript"&gt;<br><br>function MyErrorPage(p_err_item,p_err_process)<br>{<br><br> var vElementList = null;<br> var vErrorStack  = null;<br> var vOraError    = null;<br> var vOraCode     = null;<br> var vAjaxRequest = null;<br> var vAjaxResult  = null;<br> var vMyMsg       = '';<br><br> vElementList = window.document.getElementsByTagName("div");<br> for (i=0; i &lt; vElementList.length; i++)<br> {<br>  if (vElementList.className == "ErrorPageMessage")<br>  {<br>    vErrorStack = (vErrorStack ==null?"":vErrorStack+"&lt;br/&gt;")+vElementList[i].innerHTML;<br>    vElementList[i].innerHTML = '';<br>    vOraError = vErrorStack.split("ORA-");<br><br>    for(var i=1; i &lt; vOraError.length; i++) {<br><br>      vOraCode = vOraError[i].substring(0,5);<br><br>      vAjaxRequest = new htmldb_Get(null,&amp;APP_ID.,'APPLICATION_PROCESS='+p_err_process,0);<br>      vAjaxRequest.add(p_err_item,vOraCode);<br>      vAjaxResult = vAjaxRequest.get();<br><br>      if (vAjaxResult) {<br>        vMyMsg = vMyMsg + vAjaxResult + '&lt;br&gt;' ;<br>      } else {<br>        vMyMsg = vMyMsg + 'ORA-'+vOraError[i].substring(0) + '&lt;br&gt;' ;<br>      }<br><br>    }<br>    document.getElementById('ORA').innerHTML = vMyMsg;<br><br>  }<br> }<br>}<br>&lt;/script&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">   <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">1.2 Under Definition / Header. <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">&lt;body onload="MyErrorPage('F103_ERR_CODE','getErrorMsg')" #ONLOAD#&gt;#FORM_OPEN#<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">You can replace with your own ITEM and APPLICATION PROCESS<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">2. Under Error Page Template Control<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">&lt;table summary=""&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="/i/error.gif" border="0" /&gt;&lt;/td&gt;<o:p></o:p><br>&lt;/tr&gt;<o:p></o:p><br>&lt;b id='ORA'&gt;Error&lt;/b&gt;<o:p></o:p><br>&lt;tr&gt;&lt;td&gt;&lt;a href=#BACK_LINK#&gt;#OK#&lt;/a&gt;&lt;/td&gt;<o:p></o:p><br>&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">3. Application Item <o:p></o:p></span></p><p class="MsoNormal"><span style="" lang="EN-AU">F103_ERR_CODE<span style="">   </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">4. Application Proccess.<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">Name : getErrorMsg<o:p></o:p><br>Process Poing : ON DEMAND<span style="">  </span>( Make sure about this )<o:p></o:p><br>Process Text :<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">declare<o:p></o:p><br><span style="">  </span>l_msg<span style="">  </span>varchar2(500);<o:p></o:p><br>begin<o:p></o:p><br><span style="">  </span>for i in (select msg_code, msg_desc from apex_message<o:p></o:p><br><span style="">             </span>where msg_code = :F103_ERR_CODE ) <o:p></o:p><br><span style="">  </span>loop<o:p></o:p><br><span style="">    </span><span style=""></span>l_msg := 'GEN-'||i.msg_code||': '||i.msg_desc;<o:p></o:p><br><span style="">  </span>end loop;<span style="">    </span><o:p></o:p><br><span style="">  </span>htp.prn(l_msg);<o:p></o:p><br>end;<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">5. Create Apex_message (<o:p></o:p><br><span style=""> </span>id<span style="">               </span>number,<span style="">          </span>-- PK<o:p></o:p><br><span style=""> </span>msg_code<span style="">  </span>varchar2(10)<span style="">     </span>-- UK<o:p></o:p><br><span style=""> </span>msg_desc<span style="">  </span>varchar2(100) );<o:p></o:p><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">6. Scenario: Table or View does not exist coming with 3 "ORA" errors<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">There is only one record in Apex_message with msg_code = '00942' therefor it will replace error message for ORA-00942.<span style="">  </span>( note that value for msg_code is<span style="">  </span>'00942' and not 'ORA-00942' )<o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">Before<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">ORA-06550: line 1, column 28: PL/SQL:<o:p></o:p><br>ORA-00942: table or view does not exist<o:p></o:p><br>ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 247.8pt; text-indent: -247.8pt;"><span style="" lang="EN-AU"> After<o:p></o:p><br></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">ORA-06550: line 1, column 28: PL/SQL:<br>GEN-00942: My own Message <o:p></o:p><br>ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">I did this because I do not want to create my own DML process for each table<o:p></o:p><br>I hope this can help. <o:p></o:p>  <o:p></o:p></span></p> <p class="MsoNormal">Regards</p> <p class="MsoNormal">Marcelo</p>

    True the main method does not throw any exceptions, that's because there is no higher level to throw them to (actually it implicitly throws any uncaught exceptions to the JVM). That does not mean that you can't write your own try catch block around the code in the main method.

  • TS1717 Having trouble running iTunes version 11.0.2 on a Dell Laptop running Windows 7 Professional Service Pack 1.  Keep getting an error message "the software required for communicating with iPods and mobile phones was not installed correctly..." reinst

    Having trouble when I launch iTunes (version 11.0.2) on my Dell Laptop running Windows 7 Professional (service pack 1).  I get an error message indicating software required to communicate with iPod and mobile phones was not installed correctly.  Do you want iTunes to try to repair this for you?  I normally respond with OK and it immediately tells me "could not be repaired.  Please reinstall iTunes..."  I have done this a number of times to no avail.

    I also notice Quicktime is not getting installed at all.
    That one is normal nowadays (ever since the iTunes versions 10.5.x).
    The software required for communicating with iPods and mobile phones was not installed correctly. Do you want iTunes to try to repair this for you?
    Let's try a standalone Apple Mobile Device Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of why it's not installing under normal conditions.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe (or iTunes64setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleMobileDeviceSupport.msi (or AppleMobileDeviceSupport64.msi) to do a standalone AMDS install.
    (If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleMobileDeviceSupport.msi again.)
    Does it install (or uninstall and then reinstall) properly for you?
    If instead you get an error message during the install (or uninstall), let us know what it says. (Precise text, please.)

  • Error message on iweb, no communication with server

    I have three websites on my iweb and hosted by Go Daddy. The main site will not download, error message no communication with server yet other two work fine. I have been to Apple Genius and talked to Go Daddy three times and all is supposedly in order but still will not work. I am able to download on Cyberduck
    but using Iweb would be so much simpler. How can it work on two websites and not the third? Help!

    If the main site, with the URL - http://www.domain-name.com - is not downloading in the browser, it will be because the external index.html file is not present in the root folder on the server.
    The other sites will work because they have the folder-name in the URL ...
    http://www.domain.com/Folder-Name/
    ... where Folder-Name is the name of the site in iWeb.
    Its just a question of republishing the main site if you are using the iWeb FTP and use the settings shown on this page....
    http://www.iwebformusicians.com/iWeb/Publish-Website.html
    If you can use an FTP application, publish the site to a local folder and upload the external index.html file only, to the root folder on the server.

  • Error message: "the software required for communicating with Ipods and mobile phones was not installed correctly....

    2 error messages when opening itunes: "The software required for communicating with Ipods and mobile phones was not installed correctly.  Do you want Itunes to repair this for you?"  When clicking yes another message indicates not able to remove services.  Another message is: "Service (ipod service) could not be installed.  Verify that you have sufficient privileges to install system sources."  I've uninstalled all Apple services (itunes, quicktime, apple software update, apple mobiles devices support, bonjour and apple application support and reinstalled itunes/quicktime - no change in error messages.  I cannot burn CDs using Itunes.  This all seemed to happen when I updated itunes to version 10.  I have a Windows 7 64-bit operating system on a Dell Inspiron Zino HD; the Itunes software is also 64 bit.

    See the second box of  Troubleshooting issues with iTunes for Windows updates.
    tt2

Maybe you are looking for

  • Receiving an error as a open Sharing Preferences Pane.. Any idea?

    When I click on Sharing Preferences Pane I receive an error with heading "Preferences Error" and a quote "There was an error in Sharing Preferences" ..and closes  itself.. Cannot open the sharing preferences.. Crash log is below.. How can I fix this?

  • DB Connect, BW on MSSQL, Oracle as external system(NON SAP)

    Hi, Requirement: I want to connect and Extract data from Oracle database (non-sap). BI System Details: 1. BI 7.0 (EHP 1) server is running on MSSQL 2005. 2. I have WEB AS as ABAP only. 3. Operating system Win 2003 server. Oracle Database (NON SAP) De

  • No sound is coming from my built in speakers

    cant hear sounds out of my speakers! only sound i hear is when i have another display connected but the sound comes out of the other display not the laptop

  • Command line / batch processing

    To be honest, I've only ever used acrobat to read pdfs. That's it. But now I'm trying to put together a packet for work from a bunch of pdfs. Basically, I'll end up with 10+ pdf files with multiple pages each, but I only want my packet to have usuall

  • Camera Raw Preferences- Tiff / JPEG Handling -CS 3

    In the Camera Raw Preferences > JPEG + Tiff Handling Section I have " Always open TIFF/JPEG Files with Settings Using Camera Raw" UNCHECKED. Yet, when I double-click on an image in Bridge to open it, it opens the Raw window. I want the image to open