Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Newport PMC200-P Motion Controller with LabVIEW 8.0

This seems to be the same problem I’m having.
May be 1 out 1000 times the PMC200 doesn’t send or more likely the program is missing the SQR. To complicate things, the PMC200 might return too few or too many characters when you do a GPIB Read. (Adding a “ ; “ at the end of each GPIB Write seems to help.)
I’m ready for the sledge hammer approach: if the system times out, clear the PMC200, clear the GPIB and start the sub routine again. But, one never knows how long to set the timeout and how many times to rerun the sub routine. This is a poor solution but when months of programming and tens of hours of data collection at stake it might be worth it.

Any suggestions regarding resetting the PMC200 or GPIB are appreciated.
mgroom
0 Kudos
Message 11 of 14
(1,816 Views)
Hi mgroom,

I am not familiar with the PMC200, so I am not sure how to clear it. To clear the GPIB interface though, you can send an interface clear command to the bus. The function is "SendIFC", and you can find more information about it in the NI-488.2 help. Hope this helps. Thanks!

Regards,

Ebele O.
National Instruments
0 Kudos
Message 12 of 14
(1,799 Views)
I've been fussing for a while now trying to get the same setup working, using a NI GPIB-PCI card.  As mentioned above, I couldn't for the love of me get the Newport PMC200-P to respond to the *IDN? query in the NI 488.2 communicator (or any other commands at that), even with enabling the "send EOI at end of write" and the "terminate read on EOS" with the EOS byte as decimal 10 (the ASCII decimal byte termination character specified in the Newport's manual).

I have only found one instance with a successful read for the *IDN? command - and it seems quite strange to me why it happens, so I'm hoping somebody can help me understand.  This is what I did:

I opened the NI-488.2 Communicator, and configured the EOS to "send EOI at end of write" and ""terminate read on EOS" with the EOS byte as decimal 10.
I opened NI Spy, and turned the capture on.
In the Communicator, I queried the string "*IDN?\n"

When I did this, I promptly received the PMC200's identification information.  I can send the same string again and again receive the ID info without timing out, but repeating this after the second time leads to a time out error.

I then turned the capture off in NI Spy, and out of curiousity turned the capture back on, and tried the *IDN? query again, with the same results (i.e. it read the ID info twice, but times out every subsequent time).  I've attached the NI-Spy capture file (you can see the first two successful reads, then a bunch of time out errors, then me making sure the EOS was configured right, then some more time outs, then another two successful reads after turning the capture off and then back on again).  Thanks,

-Graham

0 Kudos
Message 13 of 14
(1,676 Views)

Your problems are all too familiar. I spent many hours trying to understand the GPIB communications problems. One available tool is the “GPIB Installation / Configuration Troubleshooter”. Look under NI home > Support > Troubleshooting > Installation > Getting Started > GPIB. By following the outlined procedure you can actually get the PMC200 to respond to "*IDN?\n .

I found two basic problems with communicating with the PMC200 and ESP300, 1) trying to read from the unit too soon after a read request command and 2) the once a day GPIB timeout error EABO(6).

 

One solution proposed to me by a NI rep. was to sprinkle time delays throughout my code like salt in stew. Since I don’t like a lot of salt or random time delays I targeted the read request and GPIB read vis. This helped greatly but did not overcome the once a day GPIB timeout error EABO(6).

To overcome this problem put your GPIB read vi in a while loop and test for the timeout error. If the timeout occurs, do the read again or do the entire command again. I loop a maximum of two tries before concluding there is another error. Also, just for a bit of reassurance, I make a global variable and index it every time there is a EABO(6) error.

 

A very good reference is “Serial Polling and SRQ Servicing with NI-488.2 Software and LabVIEW”. This publication has an explanation of what is going on when communicating with a PMC200 type interface and three examples of how best to communicate.

mgroom
Message 14 of 14
(1,658 Views)