VI Scripting VISA Write / Read

Hello

I am using VI scripts to change the setting of the context menu for a node GPIB write or Read GPIB - Mode of e/s synchronous. I get the reference to the node GPIB write , but when I try to use the ToMoreSpecificClass function with the target GPIBReadWriteclass, ToMoreSpecificClass returns an error 1057: LabVIEW: Type mismatch: object cannot be cast to the specified type.

I tried the same thing with the function write into text file . It also has a context menu setting for convert EOL. Trying to convert his reference with ToMoreSpecificClass function with the ReadWriteFile of the target class causes the same error: 1057 Type Mismatch.

What Miss me?

Hello

Members, I found were "binary file read" and "write to the binary file. I have attached a simple script how to find all the possible functions of a certain class.

Just to clarify: since VI scripting is not an official member of LabVIEW is not a 'problem' in the strict sense. VI script provides the helper function that can be used if it is present.

Best regards

Christoph

Tags: NI Software

Similar Questions

  • VISA Write / read error

    Hello

    From what I saw this was not posted before.

    It seems that the error of read/write VISA is quite common and after reading through a few posts and try as proposed solutions, I find that nothing works. I am trying to contact my motor controller. I have implemented the correct COM port and the interface parameters (such as baud rate, parity, etc.). In the terminal program, termites and the measurement and Automation Explorer I can access and send commands to the controller and it works (the read buffer returns an error but always returns the correct answer).

    The format of the command is EN1\r 1 where 1 is the header and address, EN1 allows the disc and \r is the carriage return. Send orders in this format works. BUT in the program I wrote that I get error infamous timeout as in the attached photo. I tried to remove playback VI but nothing works.

    Please any help would be appreciated.

    Kind regards

    Richard

    I'm quite sure your error (-1073807339, timeout) was published thousands of times before.  So if you haven't seen, you may not have tried.

    The constant string in your diagram, what is the display for this mode?  Is this normal mode or \codes?  A common error is to have it in the normal display and you send a backslash followed by an 'r', rather than send a carriage return character who presents himself as '\r' when the string constant is displayed using the backslash.

  • Visa series read write

    Hello..

    I have no problem with reading series. I want to playback multiple visa series... Fist read I want to read the data of 5x8bit uC then if visa data read isnot "NOT" I'm going to send data to the CPU as the character ' end then read data from uC to new but is leght data 2x8bit data...

    Please, help me...

    This is the number of bytes you want to read. You already said you first want to read 5 bytes. If you use VISA set up the Serial Port and the stop character allow to true, you can set a number of high bytes and playback will end when the stop character is detected. The character of default endpoint is a line break. If you set it to false, you can use the bytes VISA to the Serial Port to determine the number of bytes in the buffer is and read this number. This makes the basic example.

    Did you do any debugging serial communication base? I suggest that you use a program like Hyperterminal/Procomm/Putty/.etc before trying to write your own program. It is also difficult to give detailed advice without knowing how you have set the serial communication of the microphone.

  • Close VISA afer read property VISA?

    I have a VISA of TCPIP in my application and I found that if I call 'Close function VISA' after reading the property of VISA, my application will generate some problems. Please see the attached picture.

    Because it means that even if I do not open before VISA, I still need to close the VISA after I called the note of property?

    A beautiful explicit VISA is optional for quite a few years. Any function VISA will lead a session is automatically created, so you should make a fence.

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

  • How can I send a GET command (Group execute Trigger) with the "VISA write VI"?

    I have an old Type of Yokogawa (1981) 2553 (DC voltage current Standard) with a GPIB and an Agilent converter USB to GPIB interface. So I write my orders using the "VISA write VI. According to the manual, I send the GET command after the other commands. How can I do this?  I tried to use the GPIB VI, instead of VISAS, but I always got the error 7: "NOR-488: Interface GPIB not found '...

    You cannot use the low-level GPIB functions because you are an Agilent controller. The low-level functions are only for the OR.

    Visa application, use the trigger to make visa.

  • Serial Port Visa to read 1 line IO

    I have a visa series opened and need to read the State of the PIN-6 on a connector Series 9 pins to see if this line is high or low. Is there a way to do so by the visa series read the command?

    PIN 5 is located on a 9 pin connector. If you want to detect the actual input lines as CTS, DSR, DCD or RI, use a VISA property node and select property > settings series > Modem line parameters

  • Why my AE script can't read on my laptop?

    so, I buy a script using my work

    This script should place on ScriptUIpanels

    that script work fine on my PC, but not on my laptop (although in terms of specification, my better than my laptop)

    on my pc, this script file showed as adobe ask.jpg (the jsxbin, with the icon file)

    but on my laptop, the script file showed as file, but you don't have a program to open (blank paper icon)

    on my PC, I can open the anchor Panel and the work of the function very well

    on my laptop, I can open the Panel to anchor, but show nothing, only the blank plate

    is theres something that I have to install first on my laptop, so the jsxbin file may work correctly?

    and for pc and laptop, the two i use AE CS6

    Thank you!

    What you are trying to do and how you do? You run scripts for AE by double-clicking on the file that you use file > Scripts and looking for the script to apply it to the AE. According to the script you may need to apply to a layer or a model, or it will open a control panel. If you use a script that appears in one of the panels of menu, then you must install or copy this script to the appropriate folder. You also need to allow Scripts to write files and access network checked in the General preferences panel. I have a script which is the specific platform is limited to a single operating system.

  • Using the calculation script to write the value of the variable Substitution in a file

    Hello

    I am trying to use the calculation script to write the value of Substitution variable in a text file.
    I use the dataexport command. But it is not able to write values in the text file.

    Any help is appreciated.

    Thank you.

    MaxL would display variable. See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/dispvarb.htm

    BTW, I mostly prefer Esscmd MaxL. I think that makes me a heretic, but I don't understand why I don't want to type more rather than less to get the same result.

    Running a calc:
    Esscmd - RUNCALC 2 calcname
    MaxL - run calculation Sample.Basic.calcname;

    To be fair, Esscmd requires a dbname appname SELECT before the RUNACALC, but it is always less striking.

    However, time is running, so I don't have too. And of course, MaxL now has many things that Esscmd doesn't like Esscmd is obsolete.

    I always use Esscmd to run scripts of calc I can actually watch the output in real time as opposed to MaxL that exports the console at the end of execution.

    Kind regards

    Cameron Lackpour

  • Basic visa write and read the example

    I use basic visa read and write example to control my temperature controller in fact it works perfectly, but I want something else. First of all, I like to read the value of continuous temperature and it can be read on the read string section but I want to do but digital indicator to see the temperature value is it possible? And what is the function I should use for this? In fact I used the analysis of chain to do but I have not checked but it works or not?

    Second, I have to set temperature sometimes on the controller actually I can do writing tset = 025,0 to set the temperature F 25, it works when I write this command in the Panel (string to write), but I want to do like DIGITAL controller or something like that instead of writing the command for each setting is possible. I want to increase or decrease the temperature by pushing the increase or decrease button instead of write tset = 0.250 / a. could you help me with this?

    Thirdly, I want to run some parts of the program permanently a part when I want to run, as possible, now I have while loop and my example works permanently. I want because when I set the temperature which must not operate continuously, because it is a time command to read the temperature value this section runs continuously as the temperature on the experimental set-up is changing one I have to see this change, for example I set temperature 100 F and the peripheral controller 100 F heat , but this order is an order of time, but read temperature command should run continuously because the temperature is changing and I need to read the temperature for every 60 seconds and I can be a part.

    Make sure that you concatenate text constants "code view".

  • VISA from read/write to serial port - unable to implements several orders of writing!

    Hello

    I'm new to Labview and I'm reading from a pressure through a virtual serial port USB sensor. I am able to read the port when you use HyperTerminal

    The code sequence that I should write to the port in order to obtain measurements using hyperterminal is the following:

    ' *' (2A hex)-online start and the responses of the port by asking 'Command', I should then enter

    FF-online measurement select the port must ask the 'mode', so I should enter

    0 has-online measurement of high resolution mode and it was then that I should start receiving action.

    The port is always answer by errors when I write the start command or the FF one. I tried to establish a sequence stacked to write the three commands then read the port, I added some delay between the three of them, but it does not work.

    Now I made really simple and removed the stacked sequence and just put the three commands one after the other and try to remedy not to not on the code.

    I'm really stuck at this point, could someone help me please? I read a lot fo articles on the forum, but I can't solve this problem

    Thank you

    I have attached my VI and the SCP1000 documentation (I can provide other versions of my demo if necessary)

    The reason for your problem is a frequent misunderstanding even among experienced programmers. Take a look at this thread

    http://forums.NI.com/NI/board/message?board.ID=170&thread.ID=417750

    In your data sheet, then they return codes like 0xFF or 0x0A so has a single byte of average value. Then you in your-active code constant writing FF\n is so this equal to values in format hexadecimal 46460A and your instrument do not understand. But it will include FF0A. In order to solve your problem, you would type in \FF\n in your '-' chain helped codes. Remember too, if you type in \32 it will be converted to character 2 this being 0 x 32 50 decimals and code ASCII 50 is equal 2

    Take the time and change the display format of string between '-' display and Hex display and you will see the difference

    Hope this helps

  • cut a red number first element in reading series VISA write vi

    I want to put the serial number of a card RFID in LAbVIEW and for that I used VISA base series read VI... The Red number by which is in the following format...

    2045A15F50... im getting a square in front of tis number... How to eliminate this place?

    Sorry, I am very new to LAbVIEW and have no idea about that... So please help me

    The square indicates her you received an "unprintable" ASCII character  This could be an indicator of 'Start of message' series equipment.  They are often used in certain communications.  Read the manual of the device would be a good place to learn the expected format.  Has LabVIEW some built-in string functions as 'Trim Whitespace, vi' which can remove characters which are white space (tabs, spaces etc.) and this code snippet shows how to remove all nonprinting charaters in a string.

  • Add event to VISA N read/write

    Hi all

    I enclose the snapshot of VI I'm working.

    When the number of bytes to Port > = 1054, he reads from the port.

    I will now carry out playback VISA in a housing structure.

    Now, I want to run this function of reading in a node of the event. as every time that the bytes to port > = 1054, it should initiate an event and read function must be called in this node event rather than in a housing structure.

    How is that possible?

    Thank you

    Ritesh

    Just use the event of timeout and put inside your existing code.

  • How to use visa write in loop for

    Hello

    I'm developing a measurement with labview system. I need to write the entry within the loop and then out of the loop he supposed to read the voltage level of the analog input pin. But the problem is, out of loop is 1 table D, so when I put the entry visa within the loop, exit loop wire VISA is also table 1 d. Please help me. Should I supposed to do?

    Change of your loops of connections to register and you don't build a table or errors or resources from visa.

    /Y

  • Serial RS232 Communication VISA write does not

    I am trying to send a SPELL of 5003 01 command to my card that I am logged in via Rs232. This command should get my PCB to change play modes.

    I posted about this problem before thinking it was a problem with it not sent in HEXADECIMAL:

    http://forums.NI.com/T5/LabVIEW/RS232-serial-communications-visa-using-hex-values-seem-to-be/m-p/326...

    It wasn't the problem.

    I use the CTS line for flow control. I know that the CTS signal is reaching the computer of my PCB as I tested it and I know that the PCB can send data to the computer I get the answer correct 4 bytes in HEXADECIMAL when I use the reading visa to get my player to PCB data.

    I get a 1073807339 error when I try to write even when the read function is disabled.

    The only thing I can think is that LabView is not to recognize the signal CTS go down and, consequently, time-out.

    I use the good 9600 baud rate, 8 bits of data and no parity, 1 stop bit. I am using RTS/CTS flow control, but the RTS line is not connected. I don't think it should be a problem that RTS is used to indicate the Council when to send data to the PC to my knowledge and is not serious.

    FYI the written string section of the VI is unused. The string to write, that's where I'm seizes my "5003 01" command.

    Thank you

    Kyle

    I just thought of it. I had messed up the wiring of the PSTN line. She received the RTS line, I think. I thought I had it correct since the Tx line was correct. Thank you for your help on the problem of the HEXAGON.

Maybe you are looking for