NiMax control of instrumentation using i/o
Hello everyone
I must develop an industrial process where a stepper motor moves around orecise positions and, at a given position interval, an air bleed is ejected by a nozzle. The stepper motor motion is under control. I want to connect the nozzle through the plc and control it through the i/o which are found on NiMax. The question is how do i control the i/os?
Dear Valerio
Thanks for your reply
I am aware NiMAX cannot be used to control a process. I am actually interested in how to make the digital i/os switch in the LabVIEW environment at a given time once all the devices are configured in NiMAX. The switch is achieved by changing the state of the digital I/Os. Do I have to use the DAQ assistant to do so? Are there any other methods.
I have also another question: I am using an SCB 68 to connect the PCI NI 7330 with the air nozzle. How do I make the SCB 68 on NiMax
Thanks in advance
Leonardo
Similar Messages
-
Controlling gpib instrument using matlab
i have to do the communication between matlab and a spectral analyser via GPIB. i need commands to display on the pc, to store and print out.
thanks, i need help
LaurentHello,
If the problem is the matlab langage I can not help you and your are not on the correct Web site.
All I can do is to inform you that the drivers for this instrument are present on our site but for LabVIEW or LabWindowsCVI here :
http://sine.ni.com/apps/we/niid_web_display.drv_results?p_app_area=&p_man=rohdeSchwarz&p_keywords=&p_inst_type=&p_env=&p_drv_type=&p_int=
regards,
Marc L.
NIF -
Using real instruments to control software instruments
I recently bought the Apogee Duet to play my guitars and keyboard directly into Garageband (and soon Logic Studio). My problem is that I haven't been able to figure out how to control software instruments using real instruments. For example, is there way for me to connect my Piano Keyboard through Duet into my computer, but use it to play software tracks like strings and horns, etc? I would like to do this without using MIDI, since I just spent $500 on the Duet. Is this possible, or is the only way to control software instruments through an external instrument by using MIDI? Thanks so much for any help....
Assuming your keyboard requires an external MIDI interface (some have MIDI interfaces onboard), you can pick one up pretty cheaply - for example, M-Audio's Midisport or Uno are decent and inexpensive.
-
WIth LabVIEW how do I control an instrument with a RS232 output, using a RS232 to USB converter cable since I dont have rs232 ports. I have two instruments that I want to control in this manner. One is an Imada ZPS force gage with RS232 output. The other is a Panasonic HL-G103-S-J laser micrometer sensor which is RS422. I've done considerable LabVIEW programming using GPIB but I have no experience with devices like these. Any tutorial or examples would be greatly appreciated.
Thanks.
Solved!
Go to Solution.I understand that you want to control a device which having RS 232 port as output. If so, you can use an USB-RS232 cable from PC to device and you can control or monitor the device.
See this link http://zone.ni.com/devzone/cda/epd/p/id/2669
Also, first check the device in hyperterminal and then continue to program in labVIEW. You can find the serial VI's in Instrument I/O. -
How can I control instrument using its RS232 port in VB or VC++?
1)How can I control instrument using its RS232 port in VB or VC++?
2)What's the module or .h file need I add-in to VB or VC++?
3)Can you provide me some easy examples for that?
Thanks!Kevin,
I've used Measurement Studio - Tools for Visual Basic and Tools for Visual C++ (ActiveX component) for instrument control.
I've used both the VISA and non VISA versions and they are pretty straight forward to use for GPIB, Serial or VXI.
You might find the following page useful.
http://www.ni.com/mstudio/cworks.htm#ICC
Regards,
Kamran -
"hi....
I've ever controlled some instrument by GPIB interface using Labview 6.0...it's really easy to implement .....but the problem is that i hvae to control those instrument under the pure DOS environment now ..so i have to abandon the using of GPIB interface and Labview ....then i choose the RS232 interface with programing the Borland C++ v3.1 and sending the SCPI command by bioscom()....but it got no response at all......so i am wonder if i can control those instrument by using RS232 interface and Borland C++ v3.1 to implement a pure Dos program????if yse,how can i do and is there any sample can be refer to ????
thank you for you help"Hello Alvin-
We do not have any sample code for programming RS 232 in C on our website. However, you may want to looks at these links for general troubleshooting tips for serial:
Serial Communication Starting Point
How to Do a Serial Loopback Test
Regards,
Ray Kong
NI Applications Engineer -
Control Instrument using RS232 port
I have tried to download the IVI driver of the Agilent E3633A that stated can communicate using GPIB or Serial.
I tried to initialize the instrument but no successful.
I used a twisted ( tx and rx swap) RS232 cable (female to female) to connect between the instrument and PC com port.
Please help to advice on how to control the equipments using RS232 port inlabview. Thanks!Hello,
Here's what you can do to verify that you have established communication with the instrument.
First gather the relevant information:
1. Find a command that you know your instrument "understands" (it is highly likely that it will understand *idn? which should prompt the instrument to reply with a description of itself).
2. Verify the serial settings that your instrument uses by default, such as baud rate, number of data bits (likely 8), parity, and the number of stop bits. You can also verify what termination character the instrument uses (which it likely does); this is the last character you will need to send after sending the relevant command characters, and it will indicate the end of the command to the instrument so that it stops reading from the serial port. I doubt that the instrument is configured for flow control of any kind by default, so don't worry about that unless there is specific indication of this in the manual for your instrument.
3. Verify the type of your cable; that is, you will need to connect pin 2 of your computer's COM port to pin 3 of your instrument's COM port, and pin 3 of your computer's COM port to pin 2 of your instrument's COM port. Some cables automatically switch these connections with the wires inside the cable, others are "straight through." You can bypass the cables altogether and just use wires to make the relevant connections initially; don't worry about a twisted pair at first, just keep the wires short and you should be ok (unless you are in a particularly noisy environment).
Now build the LabVIEW program:
1. Open a blank VI
2. Navigate to and pin down the following functions palette on the block diagram:
All Functions -> Instrument I/O -> Serial
3. Place onto the block diagram the four VIs/functions in the top row in the order they appear (should be VISA Configure Serial Port, VISA Write, VISA Read, VISA Close); note that the open will be performed implicitly the property node inside the VISA Configure Serial Port VI (don't worry about this).
4. Hover over the upper left hand terminal of the VISA Configure Serial Port VI, right click, and choose
Create -> Constant; now select the PC COM port you connected your instrument to in the newly created constant
5. Create constants for the inputs to match the serial parameters that you found for your instrument above if the default values don't already match. Note that the defaults used by this VI include activating the linefeed termination character to be used when reading, as well as standard settings for serial port which may already match your instrument (check by hovering over the ports with the wiring tool; the default values will show in parenthesis)
6. Wire the top right hand terminal to the top left hand terminal of adjacent VI's (which should be in the order noted above); this connects the resource name to each so they perform the operations on the chosen serial port
7. Wire the bottom left to the bottom right hand terminals in a similar fashion; this connects the error clusters
8. Almost done... now hover over the remaining left input of the VISA Write function (called write buffer), right click, and create a constant; type *idn? (and include a linefeed character at the end by typing the key)in the string constant that you just created
9. Similarly for the read function, create a constant for the input that indicates the number of bytes to read (perhaps make this number 100 as you will likely terminate the read appropriately when a termination character is read; your instrument will likely send this), and create an indicator for the "read buffer" output which will show you the string that is read back when you run the program.
10. You should now be able to run the program; hope it works.
I would have included a screenshot or example instead of a description, but I don't have access to that at this time and perhaps it is best to actually go through the process of building the VI anyway if you are new to LAbVIEW.
Good luck and repost if you continue to have troubles!
Thank you,
Best Regards,
JLS
Best,
JLS
Sixclear -
Can I use 1 hardware contoller to control multiple instruments "smart controls" in LPX? For example....if I mapped 1 instrument's smart controls to my maschine contoller would it overwrite them if I mapped another instruments smart controls to them? I'm wondering if I can switch between mapping's based on which instrument/track I have selected. I know I can do this with quick learn feature....problem is you can only use 1 knob with it.
Thank you for your help, my example is working. Please look the my revised example and let me know if I'm making it more complicated than necessary. In order for it to work,
1. I created a cluster on my front panel to hold the control group reference numbers,
2. Converted it to typedef,
3. Used bundle with name to stuff the control reference numbers into my RefCluster,
4. Used the RefCluster typedef in my subVI,
5. In the subVI, I had to add a variant to data command before using the data.
I also extended the example to actually change values on the front panel to verify that it worked as I intended.
Ken
Attachments:
typedefexample2.zip 28 KB -
Hello,
I'm trying to use a Prologix USB GPIB controller to control GPIB
instruments, and I would like to have a virtual serial (VISA) port for
*each instrument*, as is the case with a normal GPIB controller with a
standard NI driver. However this is not what the Prologix driver
provides -- it provides a single VISA virtual serial port for the
entire controller. To address the instrument with GPIB address 11,
you first send "++addr 11" to the serial port, and then you're talking
to instrument 11. However, this means I have to change all old
Labview programs.
Is it possible to create a "wrapper" function of some kind that will
define a virtual serial (VISA) port for each *instrument* on the
controller? For example, to talk to GPIB instrument 11, call it
ASRL3::11::INSTR, each time it is written to it would have to write to
the virtual serial port of the controller, say ASRL3::INSTR, first "+
+addr 11" and then the command that is sent to it.
A clearer explanation of the difference (i.e. incompatibility), and of
my objective:
1) A normal GPIB controller with NI driver: I go to the NI
Measurement & Instrumentation Panel, under GPIB, and Scan for
Instruments; all the live instruments show up; subsequently when I
want to use Labview programs that use VISA ports, the VISA drop boxes
allow me to choose a different port for each instrument, e.g.
"GPIB0::11::INSTR", "GPIB0::12::INSTR" would be instruments at
addresses GPIB 11 and GPIB 12.
2) The Prologix GPIB controller that plugs into a USB port: In
Labview you get a *single* VISA virtual serial port, ASRL3::INSTR, for
the entire GPIB0 controller. Therefore to address GPIB instrument 11,
you write "++addr 11" to the virtual serial port ASRL3::INSTR, and
then you are communicating with device 11, so you can write and read
ASRL3::INSTR to talk to that device. Then to talk to device GPIB 12,
you write "++addr 12" to the same VISA port, and then you are talking
to that device. The problem is that this requires recoding all
Labview code, whereas I would like to be able to use the same program
either with a normal or with a Prologix GPIB controller. Therefore, I
would like to create code that scans the controller for all GPIB
attached devices and creates VISA ports for all. Such ports, when
written to, would have to first write "++addr DEVICENUM" to
ASRL3::INSTR (i.e. the port of the GPIB-USB controller) where
DEVICENUM is the GPIB address of the instrument corresponding to that
port, and then would have to do a write or read or whatever function
is being done on that instrument VISA port.
I haven't figured out if it is possible to do this easily. Help and
pointers on where to look for hints would be much appreciated. Many
thanks!
MilosMy first impression is that if you don't want to make any changes at all to existing programs is that the wrapper you need is one around VISA. You would need to intercept all of the calls into the NI VISA driver. If you create your own visa32.dll and in there, change the addressing and then call the real VISA driver, you might (repeat, might) get something to work. If this would even work, you still might find that you have to make significant changes anyway. The serial connection is going to be considerably slower, and interface specific functions such as service request handling, bus triggering of multiple instruments, etc., would be difficult to impossible. This would be a lot of work, imho, to just save a couple of hundred dollars over a real GPIB controller. I've seen this Prologix device before and have even used NI's RS-232->GPIB controller. The Prologix intended use to me seems to me more for a hobbyist or very casual user. Of course, I'm used to having multiple GPIB instruments worth 10s/100s of thousands of dollars and the cost of an fully compliant GPIB controller is just lost in the noise.
-
How to read from a HPIB instrument using GPIB software?
How Can I read from a HPIB instrument using GPIB software and library functions in Visual Basic Environment? In HPIB we do not have to send query first but in GPIB we do? Although writing and sending a command is to a HPIB instrument is pretty much the same as a GPIB instrument. Any help or suggestion?
Thanks in Advance
ShazaduhHI,
HPIB and GPIB are the same thing at a low level in terms of instrument communication. They are both compliant with the IEEE 488.2 standard.
The difference is the driver you have to use. Each manuafacturer has to develop a driver to control the interface ont he host. For National Instruments interfaces you use NI-488.2 (which you refer to GPIB functions). For HP interfaces you need to use the SICL library. For information using this library in Visual Basic you'll have to look at the SICL documentation.
You can also use VISA (HP-VISA) which would allow you use NI interfaces or other buses in the future.
Hope this helps.
DiegoF
National Instruments. -
Controlling pxi 7350 using labview software
Hi,
So i am a complete newbie when it comes to labview having only used it to control virtual instruments before and now i am the point where i want it to interact with real world items. Ok so here goes..... i have the latest labview development software and have also purchased a pxi1033 with a pxi4065 digital multimeter and a pxi 7350 motion controller integrated within.
my problem however is that i want to be able to control my motors via the umi7772 interface but cannot seem to find the correct symbols on the labview software to utilise them, i would like to use labview to create a program that will turn the stepper and evaluate what is on the dmm and then turn accordingly this is way above my level on labview currently but if anyone has any ideas then any information is greatly appreciated.
cheers
jamesHello Jamest6,
I have found some useful documentation that will help you get started with you 7350 and LabVIEW.
First of all here is a community example that you can take a look at. It is possible to download the example itself from the bottom of the page.
Read Analog Input (AI) values from NI-Motion device 73xx : https://decibel.ni.com/content/docs/DOC-5617
Then you can access these knowledge base articles for some more guidance :
How Do I Use the Digital Input/Output Lines on my 7330, 7340, or 7350 Motion Controller Card? : http://digital.ni.com/public.nsf/allkb/2D238C3BF101620C862573A60081BFFE?OpenDocument
How do I control the analog ouputs from an NI PCI motion controller in Measurement & Automation Explorer?: http://digital.ni.com/public.nsf/allkb/04B940903BDD987C862579320083C6FF?OpenDocument
Also using these manuals for both prducts will be of help to you :
NI 7330/7340/7350 Motion Controllers and
P7000 Series Stepper Drives:
http://www.ni.com/pdf/manuals/372324d.pdf
NI UMI-7774/7772 : http://www.ni.com/pdf/manuals/373359c.pdf
Another great source for looking at or using example VIs is the LabVIEW's Example Finder. Go to Help » Find Examples... When that window pops ups, double-click Toolkits & Modules in the folder list, then double-click NI Motion Assistant. I'm guessing the "Straight Line Move.vi" or "Blended Move.vi" would be most helpful to you, but you could read the descriptions of each example listed for a little bit more information about what the examples are doing.
Hope these are useful! -
How to remotely control an instrument​?
Hello,
I have an instrument(TDS Oscillscop) hich is connected to a host computer through GPIB, so how can I do to control this instrument at home? thanks,
MikeYou could configure the host computer to use VISA Server, then access the instrument as if it was connected to your computer at home.
The concept is simple, but things like firewalls, routers and port number filtering often get in the way when trying to do this sort of thing over the internet.
http://zone.ni.com/devzone/cda/tut/p/id/4789
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
In Logic Pro 9, how many midi controlled software instruments do you get and is there possibility to download more as it says 40 on the programs info on the Mac Store, as i intend to compose on it but with only 40 instruments it's not really worth it.
So i was just wondering whether it let you download more for free.
Thanks for reading
~MattYes: I too am interested in the software instruments available in Logic Pro: one has to be a bit wary of the jam packs because there don't seem to be many solo instruments included. But I looked at the Logic screen in an Apple store the other day, and it worked like GarageBand in
this respect: you created a new track choosing the software instrument option and a whole lot of instruments came
up in a column on the right: lots of solo wind instruments, plenty of keyboards and guitars of course and not very many solo strings, only one violin, in the world music subsection under Irish fiddle. Yehudi Menuhin
where are you when we need you?
What I've been trying to find out is which part of the purchase does this long list of software instruments arrive with, because it's basically the only reason
I'm interested - I get on fine with gb but it
Just hasn't got enough instruments, and as I say the jam packs don't seem
to resolve this ? Or do they? Could someone please help
me with this? -
I there, my question is quite simple, I would like to know if the "apple remote control" can be used with a mac mini and , if so, it can be used to control also the "logic pro" functions (e.g. record, start, stop etc). Thks a lot, Danilo
Good work, thanks for the report.
-
How do i simulate a digital instrument using FP
Hi
I am a new user of LabView and need to construct an application to verify the operation of data logger programs. I need simulate data from various analogue and digital instruments using standard test data from a spreadsheet. I have just about figured out how to take data from a CSV file and set a FP output to this value for analogue values (voltages and 4-20mA signals) but dont really know how to simulate a digital instrument.
For example one of the instruments I need to simulate is a rotary encoder which produces a 16 bit binary string representing a value in mm this is done on the instrument as follows:
Dataloger sets the enable line high (5V)
Datalogger reads LSB from instrument output buffer (0V = 0, 5V=1)
Dataloger sends 10ms pulse to instrument.
Next bit sent to output buffer on negative edge of pulse
Datalogger reads bit value from output buffer
Datalogger sends 10mS pulse etc etc until all 16 bits have been recieved
Datalogger sets enable line low
In order to test the logger programs I have to send test data from a CSV file to mimic the operation of the encoder ie take a decimal value from the file - convert to 16bit binary - wait for enable line on logger set channel x on FP-DI-330 high - send first bit to channel n on th FP-DO-403 - wait for logger to send clock pulse to channel y on FP-DI-330 - send next bit to channel n etc etc.
Any idea how I might do this?Good morning Jeff,
I would suggest trying to set up a "triggered" output from your FP modules. Use FP-DI-330 line as the "trigger" and set the acquisition as a reference trigger.
You would need to create an input line that monitors the digital input (trigger line) and once an input has been received (for 10ms) the digital out would then need to output the LSB and so on.
It may be necessary to implement a state machine structure, that will monitor the input until the condition is met (a trigger input) and then output the desired data. For more information on state machines refer to:
http://forums.ni.com/ni/board/message?board.id=170&message.id=123485&requireLogin=False
http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=B123AE0CB980111EE034080...
I hope this helps
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Maybe you are looking for
-
How to send job postings to multiple third party sites using the XML output
Dear Friends, We are Implementing Irecruitment for our client, Client requirement is how can we send job postings to multiple third party sites using the XML output from i-Recruitment With regards Surya .
-
How do I change the permissions of my partitioned boot camp drive?
Im running 15inch MacbookPro 2.2ghz Osx 15.1. and i boot camped it and installed windows xp home, When im in osx it will not let me write to the windows drive, i can eject it. see that it has read only permissions but i can not change them or do not
-
I needed to associate a document with a business object type. The transaction is ME41. I was only able to associate the document with a business object by bringing up a document, creating a file attachment, and then looking into table srgbtbrel and
-
Some features not available to Automatic User
We have 2 new macs running Leopard and are having the same issue with both. As the default automatic user, some features are not available. For example, the eye icon for QuickLook does not appear in any of the windows, such as the Finder. In Mail, th
-
After changing to a new case for the phone (5s) I can not hear sound when receiving calls. Therefore, I'm unaware when there's an incoming call. I checked all the obvious settings, but still can't hear it ring! Help!