Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Quantum Composers 9818 Pulse Generator. (USB, COM, Port, Communication, SCPI, Mapped, Mapping, 488.2, RS232)

I wanted to chronologue my attempts to work with Quantum Composers Model 9818 Pulse Generator (DDG).  The purpose is to aide anyone else with a similar problem, to get feedback on my problems & solutions, and to have a place where I can track what I do. 

Device Specific Information:
=========================
BootROM: V01.02
Firmware: V01.32
Channels A-F are optical outputs
Channels G-H are coaxial outputs
EXT/GATE is an optical input


First off, I want to say that I don't think NI has very good help for newbies.  The tutorials on how to make VI's seem great at first, but how do I publish them?  How do I actually connect, test, verify, and communicate with a device from start to finish?  I was told to just download the drivers.  I did that and nothing happened.  No one ever said I had to install VISA, MAX and other pieces of software.  This seems like a no-brainer to users, but to someone unfamiliar with something to the point that they don't even know that MAX, VISA and the others exist, it's pretty annoying to find out that everyone else is expecting this to all be a given.  Not to mention, I only found out that these existed through other tutorials telling me to use VISA here or MAX there.  Once I knew they existed I didn't know WHERE they existed.  On a whim I decided to look for the drivers on the "Driver Resource CD" (I had already downloaded and installed them from the website and my MFR).  Once there I didn't see ANYTHING talking about MAX, VISA, etc.  So I simply clicked the only install option I saw... and only THEN did options for VISA, MAX and a whole slew of other things I had never even heard of showed up.  This is ridiculous.  I'm sorry NI, I love your product (sort of, and so far) but your help system(s) STINK!  New users don't know what does what (heck, I STILL don't know, I'm still just trying to tread water here!), and when we DO find out what does what it takes forever to figure out WHERE it is, and then it's another hurdle to figure out HOW to use it!

SO.... I am going to lay a few things down for those of us out there working in small companies where you are the only guy using the cheapest version of LabVIEW your company would allow you to buy and now can't afford to send you to the classes.

Insert the main LabVIEW disc and install it hwo you want it.
Insert the "Device Driver Reference CD, Disc 1" and click "Install Device Drivers" regardless of the fact that you aren't in fact installing device drivers... just all the other software and APIs for the drivers.
Make sure you carefully parse your way through the options to get all the necessary components installed.  Important to you are, NI Spy, VISA, MAX (Measurement and Automation Control), Instrument Control, NI-DAQ, NI-Serial, NI-488.2, and others.  You probably don't even know what you need, but don't just select to install everything!  You'll ened up with a large number of errors unless you are licensed for the full package.

AFTER doing all that go ahead and install your device drivers.  Go into Measurement & Automation to assign names to the devices for VISA to reference them later. 

Now, I have gotten this far myself, but I keep having this problem:
I can get into Measurement & Automation and talk to and receive data from my device.  I can even use a simple pre-built .vi to do the same; however, I can not use the more important .vi's because I keep getting this error:





0 Kudos
Message 1 of 13
(8,320 Views)
The ID fails because the result from the IDN? does not match what the driver expects. You are using a 9518 driver for a 9818 instrument. The driver expects to see 95nn as the result and as NI-Spy shows, you get '9818'. There may be problems with other functions but where the initialize function is called, just wire a false constant to the ID Query? input. That will get rid of this error.
Message 2 of 13
(8,314 Views)
Thanks, I actually already did something similar, I just disabled the device query altogether.  Man, these drivers are a serious web of one thing going to the next... it's REALLY hard to tell what is going on!  I did get another error, but I can't tell what it is:



From what I hear someone at NI actually developed the code... maybe it was you since you had such a thorough and quick answer to the last question.  Maybe I should state my goal, because I'm beginning to think something from scratch would be better in my case.

I am using this DDG to control the timing of a series of 7 events in a thruster sequence.  My PM would like something that can allow him to tweak interdependencies in timing, real-time.  To give a non-proprietary, generic explanation, let's call each event as they are listed on the generator (A-H, actually, just to G since I only need seven unique events).  A few of the events are performed twice every cycle, where as some are performed only once.  (The full cycle can be broken down into two symmetric cycles where some events are actually the exact same event whereas other events just have a "sister").  Event A and B start together at the beginning, event C starts 10ms later, D 100us after that, etc etc... One of the prolems is that some events actually depend on FUTURE events.  So say for example, I move the time at which event E occurs, that means C might need to start earlier.

I've got all the math for the timing worked out generically in excel and I can even get it to display a predicted timing diagram for me and my dependents update if I change my independent variables.  What I THINK I should do in this case is implement all this math and interdependencies in a LabVIEW .vi, then add just what VISA functionality I need to initialize the device, change parameters as needed, real time, and properly save and "shutdown" the device when finished.  My PM wants to be able to either type in numerical values, or perhaps move sliders to alter timing, then press a "GO" button to upload the new constraints. 

If you are the one that wrote this puppy, or if the one that did is watching, what say ye?  Should I try to incorporate the .vi's you already made, or should I work from scratch?

-Jon
0 Kudos
Message 3 of 13
(8,310 Views)
Ok, I don't know what just happened, but I re-ran it and didn't get that error... SO, here's the NEXT problem, and it might be a hairy solution:

Apparently this code was designed either before, or without the knowledge of QC's OPTICAL OUTPUT DDG... My options for Channel output mod are simply "TTL," "Adjustable," and "35V."  None of the three work and I continuously get an Instrument-Level Error (Number 5) stated to me as such:

Instrument reports

Error 5: Invalid Parameter

Command/Query Sent::PULS1:OUTP:MOD TTL

Clearly the problem is somewhat obvious.... but FINDING where to correct this error is going to be daunting for a newbie. 

Here's the call chain:
Complete call chain:
     Quantum Composers 9500 Series.lvlib:Utility Write to Instrument.vi
     Quantum Composers 9500 Series.lvlib:Configure Chan Output.vi
     Quantum Composers 9500 Series.lvlib:Configure Channel.vi
     Quantum Composers 9500 Series Initiate Pulses.vi

Oh, why oh why does it have to be FRIDAY at THREE FIFTEEN... almost not enough time to go hunting through code, too much time to NOT.... grrrrrr.

I'm guessing one of the middle two is my starting point. 


By the way, my more permanent FIX to the last problem:

In file: "Quantum Composers 9500 Series.lvlib:Initialize.vi" (Block Diagram) Look for the Query Instrument ID Section, in a String Parameter box is the string "95[0-9][0-9]" which is an input to check for a match in the parsed return from the Pulse Generator to query "*IDN?" (Identify yourself).  You can change this to suit your needs, I used "9[0-9][0-9][0-9]" and later changed to "9818" since I will only be using the 9818.




META DATA (For Searchers):
Using Quantum Composers Plus 9818 DDG Pulse Generator
Using Quantum Composers LabVIEW Drivers as designed for 95XX series with a 9818 (or just a 9XXX in general)
0 Kudos
Message 4 of 13
(8,307 Views)

No, I didn't write the driver and no, I don't work for NI. The NI people have a blue bar next to their user name. Your first problem was simple to diagnose. I'm not sure what could cause this second problem. It may be related to the fact that you are not using a driver written for your model of instrument.

You can certainly write your own VISA Write and Read functions or use the Instrument I/O Assistant. Since you don't have the correct driver, that might be faster than trying to modify the existing code.

Message 5 of 13
(8,307 Views)
I saw your name on the boards a lot, I figured you were of NI.  Thanks for all of your help. 

Unfortunately THIS is the driver that NI AND Quantum point users to for the 9818... I don't think they realize what's going on exactly........

You are right about tackling this from scratch... grrr.  I'll probably be on again Monday with some problems.  In the meantime..... I'm going to go find out just what problems I am going to encounter.

-Jon
0 Kudos
Message 6 of 13
(8,303 Views)
Quantum may have pointed you here but I can't find any evidence that NI does. If you do a search for 9818, you get no results and the only models listed on the download site are the 95xx series. It might be worth a call to Quantum to see if anyone there can explain the difference between the 95xx and the 98xx. The changes may be minor.
Message 7 of 13
(8,300 Views)
The major changes:
the 9818 has eight channels instead of four.  I don't know about any others.
0 Kudos
Message 8 of 13
(8,298 Views)
So what exactly ARE drivers anyway?  Are they just a collection of .vi's?  Nothing seems 'proprietary' about the .vi's so far in that everything I have seen has a layers of sub-.vi's until you get to a layer that is back to good 'ol basic LabVIEW stuff.

-Jon
0 Kudos
Message 9 of 13
(8,299 Views)
On the main Instrument Driver Network page, there are links that explain what a driver is, how to use one, how to create one, etc. I think that the majority of LabVIEW users prefer to use native LabVIW drivers. That is, drivers written entirely in LabVIEW code. Put simply, they are VIs that hide the low level GPIB commands from the user. As an example, if you use a DMM driver and want to set it for Volts DC, you do not need to know the command. There would be a function in the driver that allows you to select this with a control/constant. They are intended to make life a lot easier for the programmer. The drivers that NI write, always include the source code so that you can modify them (as you've already done) in case of bugs, missing functions, or some other need.
Message 10 of 13
(8,293 Views)