Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot change GPIB address

Hi
 
I am trying to get a stepper motor to control a monochromator. The monochromator is a Jobin Yvon H20 IR, the stepper motor control interface is a JY488. I downloaded some drivers from JY's homepage. The drivers worked and I got the motor to move. Everything worked fine. When I rebooted the machine the next day, the program I had written did not work any more. However, the labview drivers worked and could contact the motor. I also found a non-labview program I had used to contact the motor several times, which also worked. Suddenly none of the labview VI's and drivers, nor the non-labview program could communicate with the motor controller. When I opened the measurement and automation explorer I discovered that the GPIB address of the controller had changed from 1 to 14, where the number 1 is a factory setting. I have not deliberately changed the address so I do not know how it happened. I have another instrument on the GPIB interface with the GPIB address 13, so maybe it has something to do with this. I cannot contact the controller with any of the labview programs or the non-labview, and I assume that this is because the GPIB address has changed.
 
I have tried to change the GPIB address with ibPAD commands, and in the ibconf program. In both places it looks fine and it confirms that it changes the address. When I go into the measurement and automation explorer however, the primary address still reads 14?!? How do I change the address? There are no hardware controls on the motor controller, only software.
 
Best regards
 
Martin
0 Kudos
Message 1 of 4
(4,511 Views)

Hello Martin,

Maybe we should go over what is happening step by step.  First which interface and driver are you using to communicate with the motor controller (what version of NI-488.2)?

Next, we should verify the primary address of your interface.  You can set the primary address of your interface card by finding it in Max and either selecting it or right clicking on it and selecting properties (it depends on what NI-488.2 driver you have). 

Next please try to change the primary address of the motor controller in ibic.  You can use ibdev to open a handle to the device (ibdev 0 14 ...).  14 is the current primary address of your controller.  Next try the ibpad command.  If you continue to get the funny behavior, try capturing this interaction with a spy capture and post it so we can check it out.  If there are no errors and the addressing is correct, it sounds like the instrument has stopped taking GPIB commands. 

Does it have any controls that tell it to ignore gpib commands?

I hope this helps,
Steven T.

0 Kudos
Message 2 of 4
(4,473 Views)
Hi
 
I am using NI software version 2.46. I tried changing the primary GPIB address of the motor controller with IBIC as You said, but it does not work. Although it accepts the change in IBIC the address is still the same in MAX. When I try to connect to the motor on the other GPIB address it cannot connect.
 
However.... I have gotton a new motor controller, and this one stays at GPIB1, and everything works. As long as it works I would rather not change anything, so I cannot send the spy readout, but thank You for the effort. It is a shame however, because the price of the controller is almost 4000$. Maybe I will change back to the old controller at one time, and if I still cannot get it working, I will write again.
 
Martin
0 Kudos
Message 3 of 4
(4,448 Views)

Martin,

I apologize.  I just realized that ibpad used on a device handle would only change the primary address of the handle, not the instrument that it represents.  Ibpad will not actually send a command to the instrument telling it that it is now at primary address x.  Please check the manual of your instrument.  Since you can only communicate with it through GPIB, it will include a command to use to change the GPIB primary adddress back to the one that your program expects.

I know that you are using another controller that does not have this problem.  Maybe you could search for the command in the manual. 

Steven T.

0 Kudos
Message 4 of 4
(4,417 Views)