Communicat​ing with Keithley 2602A using python script

Hi everyone,
I want to enable communication between my PC and Keithley 2602A SourceMeter Instrument so that I can send commands to the SMI without using Test Script Builder (TSB) - a scripting/remote controlling program that enables communication between itself and the host computer.
The reason why I want to do this is because I want to program in Python to carry out a series of tasks involving other hardwares and adjusting the voltage on the SMI at the same time. I can't use TSB to do this because TSB is solely for controlling the SMI and not other hardwares. I need to use Python scripts to consolidate all the hardware control. So far, communicating with other hardwares from my PC using Python scripts is not a problem because I have readily available libraries for them.
I have found PyVisa which I thought could solve the communication problem. So I installed PyVisa and wrote the following code to test the communication.
import visa
keithley = visa.instrument("COM1")  #SMI connected to COM1
keithley.write("smua.source.output = smua.OUTPUT_ON")  #send this command to SMI
 However, the communication was not successful as I got the error message as shown below:
C:\Documents and Settings\cho\Desktop\Python Ex>keithley_test.py
Traceback (most recent call last):
  File "C:\Documents and Settings\cho\Desktop\Python Ex\keithley_test.py", line 2, in <module>
    keithley = visa.instrument("COM1")
  File "C:\Python26\Lib\site-packages\pyvisa\visa.py", line 292, in instrument
    return SerialInstrument(resource_name, **keyw)
  File "C:\Python26\Lib\site-packages\pyvisa\visa.py", line 680, in __init__
    "delay", "send_end", "values_format")))
  File "C:\Python26\Lib\site-packages\pyvisa\visa.py", line 358, in __init__
    "lock")))
  File "C:\Python26\Lib\site-packages\pyvisa\visa.py", line 132, in __init__
    keyw.get("lock", VI_NO_LOCK))
  File "C:\Python26\Lib\site-packages\pyvisa\vpp43.py", line 753, in open
    byref(vi))
  File "C:\Python26\Lib\site-packages\pyvisa\vpp43.py", line 398,
in check_status raise visa_exceptions.VisaIOError, status
pyvisa.visa_exceptions.VisaIOError: VI_ERROR_RSRC_BUSY: The resource is valid, but VISA cannot currently access it.
Can anyone tell me what went wrong? How can I control the Keithley 2602A using a Python script run from my PC?

Hi DavItron, this is a very old thread but it's one of the top google results when I looked up info on how to implement some Python code with PyVISA to drive the Keithley 2602A so I will post this response so that other searchers can find the info.
You can store data in named variables in the Keithely 2602A and then "print" them to the remote interface using something like the following:
import visa
ps = visa.Instrument("GPIB::Address of your instrument")
ps.write("smua.source.levelv=10")
ps.write("smua.source.output=smua.OUTPUT_ON")
ps.write("currenta, voltagea = smua.measure.iv()")
ps.write("smua.source.output=smua.OUTPUT_OFF")
current = ps.ask("print(currenta)")
voltage = ps.ask("print(voltagea)")
For what I do which is mostly setting and measuring a bias point, then holding that while I trigger a measurement on another instrument, this is fine for me.  If you want to do  sweeps with a lot of data points it's probably more efficient to use the buffers directly, but I haven't needed that yet.
Hope that helps somebody!

Similar Messages

  • Help with Nav Bar using Action Script 3

    I am a flash NOOB to say the least.  Trying to teach myself.  Thank God for YouTube! LOL!  Anyway, I have build a Nav Bar for a site that has a sliding bar on the bottom of it that follows the mouse.  The problem with this nav bar is that when you change pages inside the site, the slider resets back to position X/Y = 0 and you really don't know what page you are on for sure without me having to identify each page in the page body itself.
    Does anyone know of a way using action script to have the URL of the page sent to flash and in turn use that URL to set the X and Y position of the slider to the appropriate X and Y of the button on the Nav Bar for the page the user is on?
    I have heard of using flash.external.ExternalInterface but now for sure how this really works nor if I can assign it to a variable for reference inside the action script.
    Any help would be appreciated greatly!!

    The Flash Nav Bar is at the top of each page.  But yes, when you click a button inside the flash nav bar it takes you away from your current page and loads a new one.  I am trying to tell the swf file which page it is on so I can set the X and Y position of the slider.
    You will have to excuse me if I am so noob that I loose any of your replies to this as just as Flash is new to me, so is the lingo.
    Thank you for your help.  I will research FlashVar but if you have any other ideas then I am open to them.

  • DW CS5, Sending contact form results to email with page redirection using php script

    I am currently building a site from scratch with Dreamweaver, with the intent of replacing my current website layout that was designed using Intuit's website builder. My dreamweaver site is not online, but i have setup a local test server on my computer, using XAMPP, and i have an apache server with a MySQL database and a mercury mailserver running. I mention that in case it makes a difference in your answers. If necessary, I can include those settings, but that may be asking too much.
    I have an html contact form for users to schedule service appointments. I need the resulting actioned php file to do the following after submit is clicked: verify certain fields have been entered; prevent spammers or verify human visitors; send the form results to a (hidden from public view of any kind) email address; redirect user to a confirmation page, or an error page.
    I found the following code but being less than a newbie im not sure what needs to be changed, or if its even the right script i should be using:
    5 <?php
    6 $email = $_POST['email'];
    7 $mailto = '[email protected]';
    8 $mailsubj = 'You Have a Service Request';
    9 $url = '/MyLandingPage.html';
    10 $req = '0';
    11 $mailbody = "Results from form:\r\n";
    12 $space = ' ';
    13 $line = '
    14 ';
    15 foreach ($_POST as $key => $value)
    16 {
    17 if ($req == '1')
    18 {
    19 if ($value == '')
    20 {echo "$key is empty";die;}
    21 }
    22 $j = strlen($key);
    23 if ($j >= 20)
    24 {echo "Name of form element $key cannot be longer than 20 characters";die;}
    25 $j = 20 - $j;
    26 for ($i = 1; $i <= $j; $i++)
    27 {$space .= ' ';}
    28 $value = str_replace('\r\n', "$line", $value);
    29 $conc = "{$key}:$space{$value}$line";
    30 $text .= $conc;
    31 $space = ' ';
    32 }
    33 mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    34 echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    35 ?>
    Can anyone please illuminate me on what I need?
    Thank You in advance

    Take a read here, this might enlighten you a little.
    http://www.paulgdesigns.com/learncontactform.php
    You are doing this with your local testing server, is it set up to email?
    Gary

  • Issue with Bookmark functionality (using java script) in WAD.

    Hi,
    I am working on a WAD report and instead of using the default bookmark functionality within WAD, i use a java code to get the bookmark url in a new window.
    But the problem is the java code is not working consistently at all times.
    Issue1: If i click on the bookmark button on the report for the first time, it will open up a new window with the bookmark link. But if i close that new bookmark url window and again click on the bookmark button, a new window is opened which displays the template corresponding to the bookmarkk generated earlier (the report in its executed form), instaed of the bookmark url.
    Can anyone help me to correct this issue. At any time i click the bookmark button i want to get the bookmark url opened in the new window, instead of the template.
    Issue2: The bookmark is not at all working at particular times. It will show error message at the bottom the page. What I am  thinking is, this is because of the misalignment of the java code when you sava the WAD report. The java code is so sensitive that it gets realigned each time you save the WAD report. But sometimes even without making any changes also it is not working.
    If anyone has any suggestion or inputs for solving these issues pleese help ASAP. The java code i used is given below.
    function createBookmark()
    var bwUrl="<SAP_BW_URL CMD='BOOKMARK'>";
    child1=window.open(bwUrl,'win1','width=1,height=1,alwaysLowered=0');
    window.focus();
    //Ensure that BW completed generation of the bookmark url.
    now = new Date();
    startTime = now.getTime();
    delayTime = 3000;
    //Set timeout to 3 seconds
    waitTime = startTime;
    //check if the bookmark url is ready and timeout after the specified time (delayTime).
    while (waitTime<(startTime+delayTime))
    now = new Date();
    waitTime = now.getTime();
    //BW identifies a bookmark using BOOKMARK_ID. The presence of this string
    //in the url is used to identify creation of the bookmark. If bookmark
    //is created on the server, proceed to the next step.
    if (child1.location.href.indexOf("BOOKMARK_ID") >0) 
    break;
    bookmark_url = escape(child1.location.href);
    bookmark_url = bookmark_url.replace(/%3A/g, ":");
    bookmark_url = bookmark_url.replace(/%3F/g, "?");
    bookmark_url = bookmark_url.replace(/%26/g, "&");
    bookmark_url = bookmark_url.replace(/%3D/g, "=");
    var base_url = window.location+"";
    var base_index = base_url.indexOf("?");
    base_index = base_index + 1;
    var book_link = base_url.substring(0,base_index);
    if (book_link.indexOf("sapdbi")!=-1)
    book_link = "http://dep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbia1")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbia2")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbia1")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbia2")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sapqbi")!=-1)
    book_link = "http://qep.xxx.com/sso/index.jsp?target=BW&";
    if (book_link.indexOf("sappbi")!=-1)
    book_link = "https://portal.xxx.com/sso/index.jsp?target=BW&";
    var book_index = bookmark_url.indexOf("?");
    book_index =   book_index +   1; 
    var book_length = bookmark_url.length;
    var temp_link= bookmark_url.substring(book_index,book_length);
    portal_bwUrl = book_link+temp_link;
    child1.close();
    // The below two lines are not necessary, it is left for reference.
    // https://portal.xxx.com/sso/index.jsp?target=BW&SAP-               //LANGUAGE=EN&language=EN&cmd=LDOC&TEMPLATE_ID=IPUWT_FRAME
    bookmark_window=window.open("",'_blank','width=1000px,height=30px,status=0');
    bookmark_window.moveTo(50,500);
    var body_tag = '<body leftmargin=3 topmargin=3 bgcolor=#cad4e3 class=&amp;SAPBEXTbsBdyEdg&amp;>';
    var body_text ='<p><font face=Arial size=2>
    This bookmark can be copied and pasted to Internet Explorer-Favourites, mail or other documents:
    </p>';
    bookmark_window.document.write('<title name="SAP_BW_TITLE_!IID_171">Bookmark</title>',body_text, body_tag, portal_bwUrl, '</body>');
    Thanks in Advance.

    Hi Danny
    Thanks for the update
    Hi Danny
      Thanks for the update.
      I can't find any code in the attachment.Its a Web Page.
      Rightclick on webpage and View Source
      Then i can find Code.
      Still it is not working
    Issues: Which object i have to replace with the URL in the code
    Value = 'Weekly'
    or
    fun(WEEKLY REPORT)
    and
    when i paste that code in the XHTML tab of template and tried to save it,The scripted is changed
    Please update how to proceed
    Thanks

  • Communicat​ing with a GPIB connected instrument through network

    HI Folks,
    In our lab, we have different instruments connect to
    different computers. And it is extreme inconvenient to switch computers in
    order to use different instruments since not every instrument is connected to
    the same computer. And I would like to design a labview program that can communicate
    with any instrument via network so users can have control to all the
    instruments on the same computer in the lab so they don’t have to switch computers every time they
    want to use a different instrument. How do I do that?

    You could use Remote NI-VISA. The machine to which the instruments are connected would be running the Remote NI-VISA Server. Check the NI-VISA documentation, as this is described in there.

  • Communicat​ing with PC Based CArd on Register Level

    I have an unsupported, simple, ISA Bus based PC card. I wish to communicate to this device within Labview, on a register basis (analogous to DOS inport(), outport() statements) without developing a driver. Does anyone have an idea of how this might be done? Thanks

    And the NI site has a library called accesshw.llb which can be used to do
    the same things under NT-type os's (don't know about labVIEW under Win XP
    though).
    all the best
    Andy
    "Scott Seidman" wrote in message
    news:[email protected]​.4...
    > Larry the K wrote in news:506500000008000000E1350000-
    > [email protected]:
    >
    > > I have an unsupported, simple, ISA Bus based PC card. I wish to
    > > communicate to this device within Labview, on a register basis
    > > (analogous to DOS inport(), outport() statements) without developing a
    > > driver. Does anyone have an idea of how this might be done? Thanks
    >
    > There are InPort and OutPort commands in the Advanced section of the
    > fun
    ctions palette. They will work with win95/98, but no other OS
    >
    > Scott

  • Temperatur​e controller gives wrong powerup configurat​ion after communicat​ing with RS-232

    Hello,
    I was working with a Lakeshore 330 Programmable temperature controller using the LabVIEW drivers downloaded from NI driver site. My aim was to implement a continous RS232 data acquisition. I initially thought of using the similar code to the one used in another transducer (a pressure transducer which acquires data from RS232 continously). Unfortunately, I kept this vi in the same vi as the I am developing. While executing the vi, I got error from the pressure transducer, possible because both transducers are trying to communicate using same serial port. After that, my Lakeshore 330 temperature controller always power up in wrong configuration. I cannot switch input channels. Also, in the temperature it measures, the two digits after the decimal is missing. For instance, instead of 21.43 it is just showing 21.
    Anyone know what went wrong here? I restarted the Lakeshore several times, still no change. Is it possible the wrong write command to the lakeshore somehow messed the setting? Is it possible to get back to the original factory setting. I am getting desperate.
    I deeply appreciate any help and suggestions.
    Thank you in advance
    Zch
    Solved!
    Go to Solution.

    It really doesn't sound like a LabVIEW problem but a user error.
    All I can suggest is that you read the manual for the Lakeshore controller.  They are either going to have some steps that you can use to reconfigure it using front panel controls, or perhaps their own software to help configure it.  Also look at whatever protocol they are using for serial communication.  Comparing that to whatever you were trying to do with the pressure device might tell you how you might have accidentally changed the Lakeshore controllers configuration when you got their code and serial ports all mixed up.

  • Unable to communicat​e with serial device using hex

    Hi... I have two instruments, both manufactured by the same company (Inficon), both that provide the same basic function which is rate control of vapor deposition...  Both instruments use RS-232 serial communication (baud rate of 19,200, 8 data bits, 1 stop bit, no parity, no flow control).  The only fundamental difference between the two instruments is that the instrument I will call #1 communicates serially using simple ASCII text while the second instrument (#2) communicates using HEX numbers...  Using VISA serial write and read, I have for a long time been successfully communicating with instrument #1...  I send it (serial write) a certain ASCII text command and the instrument responds with a message I successfully read back (serial read)...  That works fine...  Now I have a need to do the same "write a command and read a response" with instrument #2... I'm working with an engineer at the instrument company who has supplied me with the precise HEX messages I need to send, messages he has tested on an identical instrument #2 at his factory but so far, what works for him does not work for me...  I write the HEX string.  I get no errors but also I get NO BYTES available to read at the serial port...  Note, he is NOT using LabVIEW at the factory but is instead using a proprietary serial communication executable the factory uses internally...  He and I have resorted to having me try the simplest HELLO command in HEX that is, in fact, exactly the following
    0200480149  <--- in HEX (first two bytes are Length of command with LSB first, MSB second, the next two bytes are the command itself, in this case H1 (HEX for ASCII "H" is 0x48 and this company then uses 0x01 for 1 rather than the actual HEX for ASCII "1" which would be 0x31. Then the last byte is a checksum which is simply the HEX add of the two command bytes, 0x48 + 0x01 = 0x49...
    The bottom line I am confident the above 0200480149 (HEX) would work if I was sending it correctly but somehow I am not...  
    It's the weekend right now and I've been reading NI support posts here and I already have a couple of ideas that I intend to try on Monday...  One is I will try HyperTerminal to see I can communicate that way...  Second, the code I am using is ALMOST identical to the very basic Serial Write/Read code that can be found at (this is being done in LabViEW 7.1)
    C:\Program Files\National Instruments\LabVIEW 7.1\examples\instr\smplserl.llb\Basic Serial Write and Read.vi 
    But the ALMOST might be important...  I just noticed that I "Enable Termination Character" set to TRUE (default).  That may be causing my problem so the first thing next week I will set that to FALSE and see if my problem goes away...  But I'm trying to get a jump start on this problem (I am under time pressure to get this working) so I thought I would ask for your help...
    I also am not sure how to set up the string control that is inputting this HEX input message...  I have set it as "Normal" and also as "HEX display"...  But either way I set it, I still get "0 bytes at port" when I get to the READ portion of the code so neither "Normal" nor "HEX display" is working for me... 
    So other than trying HyperTerminal and also trying to set the "Enable Termination Character" to FALSE, can anyone suggest what I might be doing wrong???  I am pretty sure it is a formatting issue (such as sending that termination character) and I need to get it figured out soon... Any other ideas???  Any help would be much appreciated...  thanks.... bob...

    Hi...  Thanks for the response...  Find the very simple code I am using attached...  Do note that the string indicator out of the VISA read does open up with default values of 0D0A (CR LF)...  I didn't put those in and I've left them there to show what the defaults were when this code was first saved, just in case you think those values being there matter...  ??  Anyway, again, the code is attached...  Note also I have left the code with its "Enable Termination Char" set to ON (default) in the Configure VISA serial subvi.  I am not at work yet and will set that to FALSE later but you've more or less convinced me that is not going to solve my problem as that is tied to terminating the READ and does not impact the Serial WRITE...  And I appreciated the input on Portmon...  I downloaded it and will give it a try when I get to work which will be soon...  But I wanted to attach the code as you requested...  Holler back if you see anything that might help me with my issue...
    Oh, one last thing...  The manual for the instrument explicitly says that it uses "one start bit, 8 data bits, one stop bit, no parity, no flow control"...  What got my attention there is the explicit mention of "one start bit"...  Nothing in Windows or LabVIEW allows me to alter how many start bits there might be so I am assuming ALL serial comm uses one start bit and they just chose to mention it here???  Or might the start bit settings be an issue????  I am just searching... 
    Last, this code is in LabVIEW 7.1 and I really do use COM4 as I use a Keyspan serial port expander on the PC because we needed more serial ports...  That part has been tested and In fact, the other day, while in the middle of this problem we took the serial cable and hooked to what I above called the #1 instrument and talked to it just fine over COM4, same cable and everything so I think that part is good...
    thanks... bob... 
    Attachments:
    Talk with Cygnus.llb ‏35 KB

  • GPIB not communicat​ing with my magtrol instrument​s

    Hello,
    I've installed my PCI-GPIB on a system running windows xp, it was on a system running windows 98 and worked correctly. I am using the card to capture data from a Magtrol Dynomometer Controller. I've run the software and driver updates from NI website. Also, when I am in the MAX software and communicate with my instrument manually I can read correctly from the instrument. What is happening is that when I try to write and read from the magtrol controller the data stream is not ending(getting the cr-lf?). In the magtrol installation instructions it says:" GETTINGSTARTED
    1. From the Windows taskbar, click Start, then point to Settings and click Control Panel.
    2. Double-click System. This will bring up the System
    Properties dialog box.
    3. Click the Device Manager tab.
    4. Using the right mouse button, click (right-click) National Instruments GPIB Interfaces.
    5. Click Properties.
    6. Click the Device Templates tab. See Figure 2�4 System Properties & GPIB Interfaces
    Properties.
    7. Scroll down Device Name list until DEV9 is reached.
    8. Click DEV9.
    9. Set DEV attributes to the following:
    a. Under Termination Methods, select the Terminate Read on EOS check box.
    b. Change EOS Byte to �10�.
    c. Select the Readdress check box."
    The problem is when I right-click on National Instruments GPIB interfaces I get a dialog box with a tab that says "General" and an empty page. I think my devices are probably not setup correctly because I haven't followed the magtrol instructions (this worked on the windows 98 setup). I am not sure how to fix this, Any help would be appreciated.
    Thanks in advance,
    Jennifer

    Jennifer,
    Thanks for your question regarding configuring the GPIB termination settings. Depending upon which version of the NI 488.2 driver that you have installed, the method for changing these settings may be different. However, after installing the NI 488.2 driver you should be able to change the termination settings of your NI GPIB device in the Measurement and Automation Exploer. This utillity should be loacted in Programs>>National Instruments folder from the start button. After expanding the devices and interfaces folder in MAX you can right-click on the PCI-GPIB and a configuration window will appear where you can change the settings that you are refering to. A screenshot of this window is attached below.
    Shea C
    Applications Engineering
    Nationa
    l Instruments
    Attachments:
    GPIB_Config.bmp ‏426 KB

  • Hp 1210 all-in-one not communicat​ing with word through my mac

    my hp 1210 works fine except when i attempt to print a recently modified word document I get an error message that says "word could not communicate with the printer"
    I aborted a print job yesterday and the "job hold" in the print queu has a red stop sign symbol...when i click on the jobs it say there are no pending jobs.
    I am at a loss for what to do. I tried rebooting and reconnecting the printer and the mac, no change.

    Hello JPV626,
    Welcome to the HP Support Forums!
    I understand that you are having issues printing with the PSC 1210 on your Mac, seems to be a queue issue on the Mac.
    What is the Operating System installed on the Mac?
    Try resetting the Print System on the Mac (Mac OS X: How to reset the printing system), Repair disk permissions, install any and all updates on the Mac and restart. Once restarted, add the printer back in System Preferences and try printing.
    I will look back for your reply.
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Several emails per day - from blackberry communicat​ing with server?? Need to remove emails.

    Afternoon, 
    Each day my outlook email recieves about 6 - 9 emails; of the below information, with an attached 'DAT File' that needs to be opened by selecting a program.
    Information in the main body of the email
    'this message is used to carry data between Blackberry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server.'
    These emails are becoming annoying as I have lots of important work emails to deal with.
    Does anyone know how to stop these emails without effecting how the blackberry works with the pc?
    Assistance would be appreciated.
    Thanks

    Reason : You have installed Desktop Manager using the 'Desktop Redirector' option.
    Step 1: If you're not using Redirector, you should uninstall Desktop Manager and then reinstall it using the BlackBerry Internet Service option.
    Step 2: On your device, go to: Options > Advanced > Service Book, and delete all service books for [Desktop]
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Communicat​ing with modem-plea​se give some suggestion​s

    Hi Every one....
    We r having a real time system now and we r looking for a better idea for the same.
    The real time system is developed using VB and now thinking of changing to labview.
    The current system is ......Data from RTU is sent to serial device(modem) and VB application checks the modem
    every 10 second and any new data found it inserts into relevant tables in the database and after insertion to the
    database the data is fetched from the database for real time display.So in the real time dipay is getting delayed.
    ie, a record that is newly obtained is displayed in the real time display after several minutes only. 
    Think the display is delayed because of the fact that its getting displayed after inserting the data into the database
    and then reading the data from the database.
    What is the better idea to reduce the delay in display?I thought if v check the modem every 10 second and if new data got,fetch the data ,decode it ,display the information and then insert into the database,the system will be better.But if a single check of modem can give any number of messages which contain data.If v get 10 messages v have to decode 10 messages display 10 records and then insert 10 records into the database.Is there any better way for this?
    I havent worked with serial communication applications.I havent thought abt the coding side now.Just thinking of theoverall idea only.
    Thanks in advance for the suggestions.

    Hi,
    Thank you so much for your reply sir.
    Actually my question is related to modem communication .But sorry, in the first post i asked to know
    whether my idea is correct or not.
    In Our real time system,RTU send message to modem at any time.
    So as in the previous post ,after decoding the data  v can display the data ad then can insert into proper table.
    And nw i have to also add a module to store the data in a txt file also, sfter fetching the data frm the modem.
    ie,as suggested by u i want to check the modem when data arrives at the modem(instead of checking 10second or something)
    and i want just to append it to a string until i get one complete message.ie,i have to check for the end delimiter(which is carriage return in our system)and when i get the end delimiter from the modem,i have to write the entire string into the text file.As RTU send the data to modem it may be sending a part of a message or more than one message ....
    I want my entire code to be executed only when data arrives at the modem.ie,rather than putting all the code in a while loop i want some other method the code will be executed only when there is data in the serial port.Just like event structure in which certain code is executed only when an event happens(for example code inside a time out event will be executed only when the time out occurs.it is free from loop also).Is it possible to code like that?
    I just coded using bytes at serial port and putting the code inside a loop.Now my PC is not connected to modem.so i havent checked my idea is working or not.
    I want to code using VISA events.I tried to code.But i think  it is not correct..The out put of VISA wait for event's status i am not sure.
    I thought if the status is true it indicates the event occured.Can u help me regarding this?
    I am herewith attaching my idea.I have put both methods in the same VI.Sorry for the inconvenience because of the bugs in the code.
    Thanks once again....
    Attachments:
    modemread.vi ‏41 KB

  • How to get  textItem width with effects by using photoshop script

    HI,guys
    Is there any one met the same problem? I want to write a script can generate pics according the text content size dynamically, but I cant get the actual size of textItem with effects.

    #target photoshop-70.032
    var bounds = activeDocument.activeLayer.bounds;
    alert (bounds[2]-bounds[0]);
    seems to include Layer Styles like Outer Glow.

  • Compiler Error with simple vi using MatLab script nodes

    While attempting to build a simple vi to test the capabilities of LabView's interface with MatLab, I received a compiler error message that said I should report the problem to National Instruments Tech Support. The error said, "reference to undefined label from: refPC=0x41C." I've attached the vi that created the error. I am using LabView 7.0 on a PC running Windows 98.
    Attachments:
    Compliererror.vi ‏11 KB

    I don't know if this will help your problem, but there is a fix for some problems with LabVIEW 7.0 and Matlab:
    http://digital.ni.com/public.nsf/websearch/4475BC3CEB062C9586256D750058F14B?OpenDocument
    Good luck,
    -Jim

  • 6025E DAQ card is not communicat​ing with driver I have written

    I recently wrote a driver that used the 6025E DAQ card. I then packaged up this product, and am in the process of creating a second identical product. The problem is that the software I wrote does not work with the new hardware card. Nothing has changed, except for the new card. Basically, the first product works great, the second one does not... They both seem to be using the same version of NI-DAQ (6.9.1), and I can't think of anything else that would cause these problems...
    Could it be the computer speed? The actual system is a 866 MHz, but the test system (until the new computer arrives) is only 250 MHz...
    In addition, the NI-DAQ test software works fine, i.e. I can send Digital inputs and th
    e NI-DAQ test software will process the signals, but my software will not.

    First, I want to make sure I understand your terminology. You have written a driver for your 6025E? We consider NI-DAQ(6.9.1) the driver for the DAQ boards. If you are making NI-DAQ function calls, then I'd say you are using the driver. (You're not making register-level programming calls are you?)
    It's hard to say what the problem is right away, but I guess I do have some suggestions. In case you were wondering, computer speed usually isn't a problem when using standard DIO.
    What does your program do? Find a similar example program in your ...\NI-DAQ\Examples folder and see if it works.
    What is the other board you are trying to use? Is it also a 6025E?
    Also, you said the program is not working, but what is the result? Are you getting any kind of e
    rror message?
    Russell
    Applications Engineer
    National Instruments
    http://www.ni.com/support

Maybe you are looking for

  • Is it possible to wait for data using ODIWaitForData on a column of table

    Hi, Is it possible to wait for data on a column instead of waiting for data on a table.I knwo there is ODIWaitForData for which I can use the Filter Column and Filter Variable expressions to wait for data.But I do not know what is the value that I am

  • Event in JRE before OutOfMemoryError occurres

    Hi! We are developing client applications which should extensively cache server content to reduce server round-trips. When we do caching of course the client will consume a bit of java heap memory for this. To prevent OutOfMemoryError troubles in the

  • 4th Generation I Pod Touch Freezes Up

    My ipod stopped working months ago, so I put it away; last night I charged it and this morning the ipod worked like nothing had happened, I went to change the time and date and the device froze again.  Any suggestions?

  • Weblogic.servlet.security.ServletAuthentication Question

              Hi all,           I am developing on WebLogic 5.1 with service pack 6 installed. WegLogic 5.1 documentation on the ServletAuthentication class says that along with the non-static weak() method, there are two static versions of the weak() me

  • MS Patch KB2976627 Java ActiveX version control and how it affects RDS sessions

    The recent patch for MS to prevent IE from using older versions of Java ActiveX seems to put a version file under %localappdata% and pull this file from the Internet.  My questions are: 1.  How does this work when you are using a mandatory profile fo