Serial Communication issue - packed LabVIEW library used in the Scripts of TestStand

Hello

I have developed a RS422 driver in LabVIEW for the basic operation is as initialize, reading, writing, closing etc. Later I used it as a library wrapped in TestStand scripts.

The question is, when I try to read the answer to one of the command, I am able to observe it in the iteration 6th step of reading, where I'm supposed to read for the first time.

Please suggest any ideas on what could be the reason.

You need to know if the response data really who arrives late, after giving a command or the VI you wrote is not able to capture the correct data.

If you have a recorder RS 422 or bus Analyzer then it will be easy to analyze the cause.

Since you are able to read step 6 on reading a few questions:

You are still able to read on the 6th read-only? If yes then probably the target USE responds slowly to this command or it sends too much unnecessary data that are read by the 5 first readings. (depends on your reading algorithm).

Playback vi must be written such that it will be in a loop (with some time out) until it gets the required data. The expiration time should be configurable.

Also before sending the order you must ensure that the buffer is empty (rinsed).

I hope this helps.

Ravi

Tags: NI Software

Similar Questions

  • How to pass a pointer in calling labview library using dll programmed in Labwindows?

    Hello

    I'm trying to interface a camera with Labview.  However, the camera can only be programmed in C, so I use Labwindow CVI.

    I need to pass a handle from the camera of a function to another, for example. leave an opencamera function to function setparameter.

    / * Loading the Qcam driver and open the first camera * /.
    Sub DLLEXPORT LoadDriverAndOpenCamera()
    {
    QCam_CamListItem cameraList [10];
    unsigned long cameraListLength is sizeof (cameraList) /sizeof(cameraList[0]);.

    load the driver
    QCam_LoadDriver();
    a list of cameras
    QCam_ListCameras (cameraList, & cameraListLength);
    listLength is now the number of available cameras

    QCam_Handle CMAH;
    Open the first camera in the list
    QCam_OpenCamera (cameraList [0] .cameraId, &hCam);)
    }

    Apparently, the caemraId is a long unsigned (unsigned 32-bit by 32-bit Labview 2012?) and QCam_Handle is defined as void *, so it is a pointer that points to a non signed 32 bit.

    When I only use C for programming, I can pass variable CMAH to other duties so it is declared as a global variable.  Ex, the following function can be Sub SetParameter(QCam_Handle hCam).  However, here, I trying to do a Labwindows/CVI dll and then call LoadDriverAndOpenCamera() through library function call in Labview.

    My question is: How can I switch CMAH to other functions in the same dll?  I have to add the parameter to the function? For example:

    Sub DLLEXPORT LoadDriverAndOpenCamera(unsigned long cameraId, QCam_Handle* cameraHandle)

    And then add two lines:

    cameraId = cameraList [0] .cameraId;
    cameraHandle = CMAH;

    in the service?  So I spend cameraHandle out?  However, the CMAH will always have kind of vacuum.

    Even if this is the case, how can I configure node call library on Labview?  In the arg parameter set up, I do not see pointers?  It seems that I can not put in place an exit node to be a pointer that points to an unsigned long.

    Thank you very much for your help!

    Best,

    Charles

    Hello Charles,

    I noticed that you posted something similar here. you have questions about the use of the call library function node?

  • Packed error Library Project: contains the compiled code

    I have tried to understand how the packed library works for LVOOP, but facing a wall with an error and do not know how to solve.

    (i) I did a "class 1", I then put in a library called 'library'.

    (II) I create a library packed and put the top-level library source files

    (III) once compiled and registered, I create a new project and add creating newly packed library project to it. Secondly, I add one newly create class, named 'class 2 '.

    (IV) I put the legacy of class 2 as a child of the class 1.

    (v) select new VI for substitution

    (VI) get error 1035

    What I'm doing wrong or how to fix this?

    The default setting for the packaging of screws in lvlibp deletes the block diagram.

    You must not delete dynamic distribution pattern-block screw you wish to override.

    hope this helps,

    Norbert

  • Using the script for import and export

    Hello

    Can any such a me what is the use of the script for import and export.

    After you move the pages from / to server what is the need to import / export command.

    export/oracle/apps/ap/setup/webui/customizations/site/0/SetupPG - rootdir < destination path > - user < database username > - password < database password > - dbconnection "(description = (address_list = (address = (community = tcp.world) (protocol = tcp) (host = < host name > (port < port id > =))) (connect_data = (sid = < sid >)))".) "

    Thanks in advance,
    Roselyne

    Hi Flo,

    Page and the region are stores in database import/export we really want pages/areas to store in the database.

    Thank you
    -Anil

  • Using wildcard characters in the Script Map

    Hi everyone, im new in FDM and I have some doubts on mapping scripts.

    I have to recreate this translation in FDM Hyperion rule:

    ACC_SAP tm_sap Reverse sign UD4
    N21099Z300 {NULL} FAKE CD1
    D31199Z000 {NULL} FAKE CD1
    ???? 99 * FAKE CD

    ACC_SAP is the account of the source
    TM_SAP will be loaded UD5 (as looking up)

    How can I manage with a similar mapping?

    I guess the use of the script, but im not sure how to use wildcards wildcard in scripts, is - it possible?

    Another related issue, in an explicit mapping, how can I manage with NULL values if I want to assign [none] value, what I have to insert the value NULL into the field source th?

    BR and thanks

    As long as you're using wildcards in the source and them pointing to a single account, you can do all that you have demonstrated. All this is done directly in the similar table. No script is needed.

    ??? 99 * goes to the HFM_99 or whatever your target.

  • How to identify the use of the contours?

    Operating system: Sun Solaris x 86-64
    DB: 10.2.0.3.

    The production system has been improved to 8.1.7.4 to 10.2.0.3 (RBO to CBO) last year. Just after the upgrade, there are some severe performance with SQL issues and we had to create some outline for the stability of the regime that helped us a lot to ALBUMS.

    We noticed that the lines were used by looking at the status of
    select name,used,timestamp from dba_outlines and
    select ol_name,flags from outln.ol$ (flags switched from 0(UNUSED) to 1 (USED)
    Here's my question:
    In my view, that the timestamp is when the contours are used for firsttime. We are trying to identify, and if possible, drop these contours because we made some changes to our process of collection of statistics and best performance, we see overall results for other SQL.

    We plan to update the indicators from 1 to 0, which would make it the contours of UNUSED State and if the SQL whose contours are created being issued, contours must be used and the flags would be updated to 1.

    Is there any other way to achieve the same?

    Anantha.

    By documentation, OUTLINE_CATEGORY null means line has not been used.

  • LabVIEW block in serial communication!

    Hello.

    I use pl2303HXA (usb to UART converter) in my design data and sending of microphone for pc in LabVIEW 2013 x 86.

    When I tried in a terminal CODEVISION, everything is OK and each microphone send to a PC, Hypertermial or Terminal CODEVISION is received correctly.

    but when I run LabVIEW, it works for a few seconds and Communication all of a sudden abrupt and LabVIEW crash. You can see in picture I capture from my Telechareger below. Why LabVIEW hang?

    the image is the front of my VI.

    every time it blocks, I have to restart LabVIEW and test again. in the meanwhile I have to said hang occur randomly.

    Thank you.


  • Serial Port problems - carriage return and use as an executable file

    Hello

    I developed an application to send a few simple commands on the serial port and read the corresponding answers of a device that I am in communication with.  I have been using logical Port to watch the line TX of the serial port.

    By using the Visa configure Serial Port I set the stop character property allow true and used the hexadecimal value D trying to make the termination a carriage return characters.  When I sent the order, I'll send the cmd followed by Enter.  No matter if this property is set to true or the hexadecimal value is set to D for carriage return or line break is, the serial port would always send a line break.

    Then I got crafty and the string constant under normal display to hexadecimal display.  The ONLY way I could send a carriage return was manually putting 0x0D after ordering.  So my question is, why the Visa set up the Serial Port is not working correctly, and is there a better way to send a carriage return?

    My next issue is facing the construction of executable files.  I'm using LabVIEW 8.2 and wrote this program for another employee to use on his laptop computer.  I did install runtime Labview 8.2 and led to the executable that I generated.  I did-> the executable by clicking Tools build the executable.  The problem I noticed was that the executable would open and will work perfectly, but it would not send any data the serial port.  I then ran the executable on my laptop (which contains the full version of LabVIEW 8.2) and the serial port has worked well.  I guess my question is... Are there plug-ins that must be installed to use the serial port with the Labview runtime engine?  Or y at - it a step that I failed to do?

    Thank you

    Gary Still

    Not immerse in the first issue. The Knight will probably be galloping until shortly.

    For your second question, after building the executable, you must build the installer and includes support for the VISA. VISA is required for serial communication, and it does not accept American Express.

    It may be useful

    -AK2DM

  • LabVIEW library for twain

    We are currently using the demo version we sent by Graftek Imaging on the following link:

    FTP://FTP.AllianceVision.com/LabVIEWtools/Toolkit Twain LabVIEW.zip boxes.

    After reading the manual and install the libraries successfully, we are not able to run the DEMO VI included in the lib of the user. We get an error: error 97 took place at an unknown system error in TWAINV5 - clear Acquisition.vi-> TWAINV5 - demo IMAQ 1. vi this is due to the "Open Source Manager VI" due to the error: - 2147221164 - class not registered in TWAINV5 - Open Source Manager.vi-> TWAINV5 - demo IMAQ 1. vi

    To ensure that our DSM and the Data Source to scan (Canon LIDE220) are connected successfully, we used twacker32 and everything was fine. We do not know if our problem is with the installation of law libraries, or using the library of the Vision of the Alliance. We are very interested in resolving this issue and who runs the application before investing in a license. Thank you for your support.
    Steps to reproduce the BP: we have just opened the files of the DEMO: demo IMAQ1 and IMAQ 2 demo.

    Eve thnx for your concern... .i got the solution of the question which is the version compatabilities I work on labview 2015 64-bit and the cannon scanner scangear is 32-bit, which causes the conflict in labview twain driver which is obtained by the site of the alliance and the scanner driver

    is what I do for the solution: using labview 2015 32bits and the scangear driver to my scanner and it works well

  • Programming of the digital I/o pins on the NOR myRIO-9100 for serial communication

    I use NEITHER myRIO for my robot and I want to use four reading of the distance sensors that communicate via the serial port. But the myRIO has only two UART ports on board so I was wondering if there is a way to program the digital pins use for serial communication. Any help appreciated.

    It is possible.  Here is an example that I could find.

    Example of reference to RS-232 for LabVIEW FPGA Interface

  • Serial communication error VISA with LUDL stage controller

    Hello

    I'm trying to control a micro-positionnement made by Ludl stage. The model is Ludl MAC2000. It seems that the RS232 comunnication is implemented because I can talk to the controller using HyperTerminal. However, when I want to do the same thing through Labview, I can't answer the controller at all. The vi is roughly the same as the visa basic read/write in the example. Looks like a very similar problem in this post:

    http://forums.NI.com/T5/instrument-control-GPIB-serial/visa-serial-communication-problem/m-p/567065#...

    But the trick of nature of endpoint does not help in my case: I tried to toggle the termination character setting in the property node and different combinations of '\r', '\n' as termination characters, but nothing has worked so far.

    Seems to me there is some difference between the interpretations of the same order to Hyper Terminal in Labview. But I just can't understand what it could be.

    Anyone with a similar experience could give me some comments/suggestions? Thank you very much!

    Another difference between hyperterminal and labview is the speed of sending characters.

    LabVIEW breaks out the whole string to the controller

    HyperTerminal is this character by character. So much slower and slow the controller can be affected by this.

    You could add a loop around the writing of visa (to make it easy convert the string into a byte array outside of the loop and convert it to a string inside and you have a shipment char by char in LabVIEW

  • Serial communication - ignore parity error

    I have a question about how LabVIEW opens a serial port for communication. I communicate with a device that uses a protocol owner. It sets and clears the parity bit to indicate the nature of the response. For example, the orders are sent with the parity bit higher while responses are sent with the weak parity bit (unless the answer is at the end of the transmission, in which case the device sets the parity bit high to indicate).

    My problem is the way that LabVIEW opens the serial port for communication. Using Portmon, that I captured the control indicators, that it sends to Windows to configure serial communication:

    IOCTL_SERIAL_SET_LINE_CONTROL   Serial0 SUCCESS StopBits: 1 Parity: MARK WordLength: 8IOCTL_SERIAL_SET_CHAR  Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13IOCTL_SERIAL_SET_HANDFLOW  Serial0 SUCCESS Shake:1 Replace:44 XonLimit:64 XoffLimit:64
    

    Note the values 'Shake' and 'replace '. In my view, they are originally bytes with parity errors is removed. A separate RS232 Comm Debug tool that I use with success looks like this:

    IOCTL_SERIAL_SET_LINE_CONTROL    Serial0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8IOCTL_SERIAL_SET_CHAR  Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13IOCTL_SERIAL_SET_HANDFLOW  Serial0 SUCCESS Shake:0 Replace:80000000 XonLimit:128 XoffLimit:128
    

    Notice the difference in values. By using this tool, Windows does not packages with parity errors - that's what I want. Is there any way to change how LabVIEW opens the serial communication port to achieve?

    I tried to change the parity, where the ILO is defined differently, but I think that I am running in a race condition; LabVIEW can not run the code and change the mode of fast enough parity before the next byte of data is sent by the device.

    Ravens fan: the parity bit, in the proprietary protocol, that I use, is not used for parity checking. Basically, the protocol uses a 9-bit serial communication. The parity bit must be paid or compensated according to what byte do (if it is a command, if it is the end of transmission, etc.).

    I found an old post on this page which seems to answer my question (my apologies for not completely research before posting... I learn the right use/search phrases that I find more information). I download the 3.4.1 version of VISA now.

  • Automing instruments LabVIEW without using specific and coding drivers for each instrument?

    Hello

    I'm new to programming in labVIEW, but I had a few questions about its use in automation and remote controlling several instruments.

    It is an ideal software for automation of various instruments remote control/test. Assuming that I have several different companies spectrum analyzers, I understand that labVIEW drivers of instruments or special VI who would control these instruments. But if I wanted that all these spectrum analyzers to say, to display on another computer using the remote control, but I wanted to use the same program for effeciency, is it possible to do so universally for all instruments using labVIEW? Or do I have to adapt this program for each instrument to instrument drivers cause?

    If labVIEW can do that, is - anyone had good success for such scenarios in other programming languages?

    Thanks in advance for your help.

    Look for the Abstraction Layer material (that you can implement with LabVIEW, even if it's a slightly advanced topic).

    The idea of having a specific Test and be able to enforce it against different Instruments, decided at run time, is the kind of situation that LabVIEW and use of HALs was designed to facilitate.

    The concept is to 'Levels of Abstraction'.  When you create a test, you can design it for an abstract Framistan, since all the Framistans are supposed to be able to measure Vorbels in the range of 0 to 100, so you just plug a generator of Vorbel to generate Vorbels in a certain sequence of Test (linear, random, quickly, slowly, pulsatile, continuous, you decide), measure your Abstract Framistan records readings and compare with the results you expect write the results in a nice report.

    Of course, Framistat of OR uses Ethernet as the means of communication, while HP uses a serial port (depending on the model, series settings can change) and uses of the Intel one. DLL to communicate with the low-level API.  So you also need to develop, for each specific instrument, an "interface" between its API and the Framistan abstract (not everyone uses Vorbels as the input unit, for example).

    So the good news is that it can be done, the bad news is that one of the best ways of handling this type of question on the programming is to use OOP (OOP).  A number of languages (LabVIEW, C++, JAVA) support OOP, but LabVIEW might have the advantage when it comes to interact with the material.

    I you are looking for Hardware Abstraction Layer?  Add LabVIEW to the search query and you should find some nice presentations by Elijah Kerry...

    Bob Schor

  • VISA + Serial Communication - need help!

    Hello world

    I have a lot of help with my project of this forum and I'm looking for more . Thank you for taking the time to help. Please bear with my as I ask a LOT of questions.

    I intend to control a frequency converter using its series terminals and send orders from my PC + LabVIEW it. The commands do the basic functions like, start, stop, speed up/down etc etc. I use a converter Series USB to transfer data.

    Now, I ve played with examples like SERIAL COMMUNICATION VI and others and I begin to understand the functioning of VISA.

    Q1. In order for LabVIEW + VISA contact my frequency converter, do I need to install some sort of a driver for him to recognize? The frequency controller is old ages, even I don't know and I don't think I can find a driver for it any time soon? What kind of driver I'm looking for? Is it possible to customize my own driver and which would be easy?

    accessory included - process.jpg

    I downloaded some pictures about the problems of data format. I need to send information to the converter to format "telegram" as shown in the image below. Each 'function' in the 'format telegram' has varied length in bytes: some have 1 others have 2, other 4...

    I also downloaded an image called "Format.jpg" which indicates what information each of these 'functions' will contain. Note:-the frequency converter uses only the last 4 bits.

    Say for example:

    START function will have this bit of information-

    Start the Byte - ASCII ' 59 "

    Address - 00

    Control character -? I'm not sure what it should be I need to use the converter based on parameter values - is confused on what to choose - C, U, I or r Start, stop, etc. have their own specific parameter values such as 402, 404 RESP, so I guess I want update (U)?

    Word of State control -? depends on the previous action

    Sign - do not necessary

    Data - 0

    Comma - is not necessary

    check the sum - is not necessary

    Stop the Byte - ' > ' (ASCII: 62)

    Phew... How would I go about clubbing this whole format together to send a control signal? Put all this information in a table allow somehow?

    Please help to me... to achieve desperately need...

    Thank you

    Sandeep

    It would be useful that you could find a driver, but it is not absolutely necessary to have a. You can write your own, use the Instrument i/o Assistant, or use VISA readings and some discreet.

    The format of the commands is a bit complicated but not impossible. You just need to be careful to have the exact number of bytes.

    What I don't see in the atttachments, it is possible words to control and the State and the number of parameter. I hope these are in another part of the manual.

    A bytes example (without the control and settings) to update the frequency to 12.34 could be '<00U________+123403??>'.

  • I already use my code, but I lost the serial number. Now that I've installed the program, I can't buy back again. How can I activate the cloud creative adobe?

    I already use my code, but I lost the serial number. Now that I've installed the program, I can't buy back again. How can I activate the cloud creative adobe?

    Ask the serial number http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    -If you have a non-Cloud program, you must provide the name of the program to learn more

    Some general information for a subscription of cloud

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    http://www.Adobe.com/products/creativecloud/FAQ.html

    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall

    http://forums.Adobe.com/community/download_install_setup/creative_cloud_faq

    What is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    To start https://helpx.adobe.com/creative-cloud.html the Cloud

    -Installation, update or uninstall and launching after installation

Maybe you are looking for

  • Ink system failure error Code 0xc19a0013 HP Officejet 6500 has

    Printer has stopped printing in black ink: get a gray tone or no impression.  Get higher up the ink system failure error. Reviewed the help pages and have installed new black ink cartridge, check the squares of all the cartridges, clean the print hea

  • Tecra A8 - VAP download password required

    Hello I have a Tecra A8 and need to download VAP, the only problem is that I keep getting request user name and password, but when I enter these details that they are not accepted.I would really appreciate ideas especially from someone at Toshiba. Th

  • Worried about an email

    I received an email from * *.com claiming to be from an Apple Store, saying that my ID Apple has been compromised. Who should I contact to report the email? Thank you very much LeniPen

  • What model of FlexMotion nuLogic interface cards is it?

    Hello I am trying to replace the map shown on the attached photo, but I need the diagram of pin assignment. The only information that I was able to get the card, is that it is a nuLogic Inc. FlexMotion Interface BD. from 1995. I can't find a specific

  • Upgrading an Envy 15-j171nr with 8GB and 24GB SSD 16 GB cache

    I'm a 15-j171nr with 8GB and 24 GB SSD cache. Whe I have it set to purchase the Configurator said the cache of 24GO was incompatible with more than 8 GB of RAM.  'Maintenance and Service of Guide' (p/n 733845-001) said the same thing on page 5: «mSAT