Device with both RS232 and TCPIP

Gurus,
I'm writing a driver for a new instrument I designed.  It has an RS232 port and an internal RS232<>Wifi module from Roving Networks.  I wrote the RS232 vi's using VISA.  Now I'm trying to figure the best way to handle both types of comms within one vi.  So far I added my TCP address into MAX, it shows up in the list of VISA's.  
I put in a boolean switch on the panel (select TCPIP or RS232) and a CASE in the code to switch between initializing RS232/TCPIP.  Looks sloppy though...  It keeps crashing on a VISA READ ("lost comms"?) even though the init works fines with no errors, but I'll try to debug that..
I'm a HW guy creating drivers, don't know all the "fun" stuff you guys do 
1 - What is the best practive way to implement a dual-comms driver?
2 - Does any PC I install this driver on have to have MAX on it (to configure the TCPIP socket?
3 - Can anyone share an init / write & get data vi's please who has done this?  My device only has 4 values to read/write, so very simple.
Thanks!!!!
Streve

You can format the VISA resource name directly allowing you to communicate using VISA using either the RS-232 or TCP connection. The piece of your code that will need to care about this is the initialization. Everything down stream will simply use VISA read or write. If you don't know the exact size of the returned data or you don't have a delimiter for your messages a method to read unknown sizes of data is to read a single byte. This read will use a longer timeout. Once a single character is read read chunks of data (some reasonable size) but use a much shorter timeout. The logic here is that there will be a break between messages. The shorter timeout should be less than the expected interval between messages.
Since you will be using both serial and TCP communications don't use the Bytes At Port method in VISA. This only applies to the serial connection and therefore your general read/write VIs will have to have logic to differentient behavior based on the connection type. You should avoid doing this and limit that to the initialization only.
I have implemented several variotions of a generic communication interface library. The most recent is LVOOP. I am not at liberty to post these however. But it is very doable.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • How do I use Firefox sync on my Android device with both Aurora and Release?

    I have both Aurora and Release installed on my Android phone. I have set up a New Sync account on my desktop. I can log in to it with Release, and it syncs great.
    However, my Aurora build keeps popping a "could not sign in" notification. If I touch the notification, it takes me to sync settings. I try to log in (same username and password), but it says "Could not sign in".
    if I look in my Android settings, I have two "accounts" - one for Release and one for Aurora - and _both_ claim that they most recently synced 5 minutes ago! But I made an update to my bookmarks on desktop 10 minutes ago, and it's appeared in Release but not in Aurora. So the Aurora "last sync time" seems to be a lie.
    The reason I'm on SUMO is that I don't know if this is a supported configuration. I remember with old sync there were some rules about whether you could have multiple copies of Firefox on the same device. Is this a supported configuration? If so, should I file a bug or have I missed something here?
    Gerv

    HI Snickers,
    There is an option to sync tabs. About:sync-tabs works on the desktop and can see the tabs from that device however this feature is not available for the mobile device. However from an active sync the current sessions are visible from the desktop page.
    In order to restore a session you may be able to restore the session if it crashed. [https://support.mozilla.org/en-US/questions/1026370#answer-644109 With these instructions]

  • I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    I have an iPhone and iPad. I would like to get my husband an iPhone. Are we able to sync all devices and share info with both iPhones and the iPad, using a single email address?

    Thanks for that. He is one of the last holdouts in IT so an email address for him would just mean I have 2 to check so that is what I am trying to avoid as we move into retirement:)

  • How can I hook up an epson scanner (2480/2580) via USB/Firewire hub- APEBS and be able to operate the scanner with both laptop and desktop computer?

    My Artisan50 works in this configuration currently!

    You can't scan to a device connected to the base station's USB port. Devices other than computers with both USB and FireWire ports don't provide any crossover between the technologies unless specifically noted in their description.
    (58440)

  • HT1766 can I back up my new device with both icloud & itunes

    Can I restore my new device from both itunes and icloud ?

    You've asked 2 different questions.
    can i back up my new device with both icloud & itunes
    You can set it up to backup to iCloud. Once you've done this you can back it up to iTunes on your computer manually, so technically, yes. You can back it up to both.
    Can I restore my new device from both itunes and icloud ?
    If you have backed up a device to both, then you can restore either one. Restoring completely overwrites the contents of the phone, so if you restore it from iCloud, then restore it from iTunes, the data you restored from iCloud will be wiped from the phone and replaced with the data you restored from iTunes. The only way to initiate a restore from iCloud is to wipe the phone and start the iCloud restore from the setup wizard...
    Now, maybe you'd like to re-state your question so that you get the answer you're actually looking for instead of answers that correctly address what you asked, but do not address what you meant to ask.

  • Shooting with both 1080 and 720 settings on location?

    Hello,
    I'm new to video world. 7D has been my camera for photography and now I'm interested in using it to do some video as well. I've been reading and searching a lot online lately and was wondering if below is the best way to approach an on-location shoot:
    1. Shoot with 'mainly 1920x1080 (24fps)' setting and 'switch to 1280x720 (60fps) setting' for the part which I know I will use the footage for 'slow motion'
    2. After finish shooting, bring all footages to CS5 premiere and use '1920x1080 (24fps)' sequence/timeline to process footages shot with both 1080 and 720 settings.
    3. Use the 'Interpret Footage' function to slow down the footage shot with 1280x720 setting and make it 24fps
    Would this strategy work well or should I do the entire shoot with just '1280x720 (60fps)' setting and still use the '1920x1080 (24fps)' timeline in CS5?
    Thank you for any help that you could provide as I'm eager to learn!

    I think your question involves a couple of misconceptions:
    assuming you're referring to Canon 7D, OnLocation does not support that camera to the best of my knowledge. For live monitoring and recording, OL works only with devices that output via Firewire (IEEE 1394), which I don't believe is true of the 7D.
    while PPRO's Interpret Footage feature can serves the purpose of making a clip play in slow motion, that's not it's intent. Moreover, Premiere has better ways of achieving the goal, namely the Time Remapping feature and the Rate Stretch tool. Rather than attempting to explain those features here, I'll simply urge you to read the page in the help titled "Change speed and duration for one or more clips" (Home / Using Adobe Premiere Pro CS5 / Effects and transitions / Duration and speed)
    As to your most basic question of what resolution and framerate to shoot, I'm not the best person to answer that, and the OnLocation forum is probably not the best place to get an answer. I'd suggest either the Premiere Pro forum here on Adobe.com or a more general forum such as dvinfo.net, creativecow.net, or dvxuser.com.

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    Check the eBay listing. Did it state the device was Activation Locked? If not, then make a claim as Meg stated and get a refund. You will not be able to activate the phone and no one can help you contact the owner, unless that is the person that sold the device. If they cannot remove the phone from their account because it is not theirs, then refund is your route. Even Apple cannot assist with locating the previous owner.

  • Sending emails with both body and attachment to multiple recipients

    I have a requirement to send email with body and attachment to multiple recipients.
    Body of the email is a standard text. It is a proxy-to-mail scenario.
    Here is what I've done: (I'm using PI 7.11)
    One mapping from Source to Target structure (format of the attachment text file)
    Second mapping from Target Structure to Mail Package format.
    In the second mapping I'm concatenating the output of first step into "Content" of the Mail Package.
    "XIPAYLOAD" is the message protocol used.
    The "Keep attachments" option in the Mail adapter allows only to send "Content" as attachment or as body of the email.
    How to send an email with both content and text?
    The other problem is even with using ASMA, I can't send email to multiple recipients. I can only do CC and TO for 1 person each - a total of 2. Although I can resolve this by creating mailing lists, it is better if this can be addressed in PI.
    Thanks for any input you can provide!
    Edited by: crazylad on Jan 18, 2012 3:39 PM

    Thank you for your response Mikael.
    For the first question, I was able to find the solution in the following blog:
    XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF
    (I just needed to search with the right set of key words )
    The key is to set the "Content Encoding" as "None" in the mail adapter. If this is not done, the mail will be sent with an attachment - untitled.bin containing both the mail body and the attachment text. Also, don't forget to check the "Keep Attachments" checkbox in the mail adapter.
    Multiple recipients could be added by separating the email IDs with a Comma. I have used ASMA to set the recipients.

  • External hard drive use with both Mac and Windows

    I know that you can't use an iPod (through iTunes) with both Mac and Windows, but can you still use it as an external hard drive with both operating systems?

    Yes, if the iPod is in Windows format. Mac OS X can read and write Windows formatted iPods, but Windows can't access Mac formatted disks unless special software is installed.
    (9844)

  • Cisco ISE with both internal and External RADIUS Server

    Hi
    I have ISE 1.2 , I configured it as management monitor and PSN and it work fine
    I would like to know if I can integrate an external radius server and work with both internal and External RADIUS Server simultanously
    So some computer (groupe_A in active directory ) will continu to made radius authentication on the ISE internal radius and other computer (groupe_B in active directory) will made radius authentication on an external radius server
    I will like to know if it is possible to configure it and how I can do it ?
    Thanks in advance for your help
    Regards
    Blaise

    Cisco ISE can function both as a RADIUS server and as a RADIUS proxy server. When it acts as a proxy server, Cisco ISE receives authentication and accounting requests from the network access server (NAS) and forwards them to the external RADIUS server. Cisco ISE accepts the results of the requests and returns them to the NAS.
    Cisco ISE can simultaneously act as a proxy server to multiple external RADIUS servers. You can use the external RADIUS servers that you configure here in RADIUS server sequences. The External RADIUS Server page lists all the external RADIUS servers that you have defined in Cisco ISE. You can use the filter option to search for specific RADIUS servers based on the name or description, or both. In both simple and rule-based authentication policies, you can use the RADIUS server sequences to proxy the requests to a RADIUS server.
    The RADIUS server sequence strips the domain name from the RADIUS-Username attribute for RADIUS authentications. This domain stripping is not applicable for EAP authentications, which use the EAP-Identity attribute. The RADIUS proxy server obtains the username from the RADIUS-Username attribute and strips it from the character that you specify when you configure the RADIUS server sequence. For EAP authentications, the RADIUS proxy server obtains the username from the EAP-Identity attribute. EAP authentications that use the RADIUS server sequence will succeed only if the EAP-Identity and RADIUS-Username values are the same.

  • In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?

    In Creative Cloud, does the $9.99/month Individual Photography plan come with BOTH Lightroom and Photoshop CC?  It is not very clear on the home page.  It shows both and mentions both, but doesn't specifically say BOTH come with the monthly $9.99/month plan.  Can somebody clarify?

    Special Photography Plan
    http://helpx.adobe.com/photoshop/kb/differences-photoshop-creative-cloud-photography.html

  • Form report with both edit and column link

    hi experts,
    How can we create form report with both edit and column link. Ie, the form should have both the Edit link and column link. When we click on the edit link(in page1) it should go for the page2 and the page2 should display the corresponding row fields which should be editable. but when i click the column link it should bring me to the next page but the corresponding values of the column should not be editable.
    Regars,
    KK

    hi,
    Here i have achieved this by making the column link and page navigation.

  • I have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    i have a MacBookPro5,5 how do i connect it to my hdtv WITH BOTH AUDIO AND VIDEO? and where can i buy this cable(s)?

    thank you roger. i have attempted to connect my mbp now 3 times (all different ways with different cables purchased) but unfortunately no success. i understand that with me having an older mbp it can be a challenge. i have found this page http://www.wikihow.com/Connect-a-Macbook-to-a-TV but with my unsuccessful history, i have become skeptical. i will try your suggestion and let you know. thank you again.

  • My PC crashed with both CS6 and Lightroom 4. .

    My PC crashed with both CS6 and Lightroom 4. . .I purchased a Mac Pro.  Can I download the Mac versions of both programs and use my currenct serial numbers?

    You can with Lightroom, but not (as far as I know) with Photoshop. You ought to get in touch with Adobe's customer service people and see if you can "sidegrade" to Mac for a relatively small fee.
    Hal

Maybe you are looking for