Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing GPIB device with RS232 device

I have an antiquated Belhman power supply that is GPIB controlled. This device is failing. We have equivalent Belhman replacement power supplies that have only an RS232 interface.

 

Can I use the GPIB to RS232 converter to effectively control the RS232 replacement power supply? 

Can the code remain as is unaltered? Below is an example of the Belhman initialization code in "C".

 

int InitBehlman1350ACPwrSupply ()
/* *********************************************************** */
/* This function initializes the Behlman 1350 AC Power Supply */
/* returning a PASS if the initialization was successful and */
/* a FAIL if unsuccessful. */
/* *********************************************************** */
{
int fail_flg, BOARD, gpiberr, reterr;
char ACPSBUFFER[71];

fail_flg = PASS;
FillBytes (ACPSBUFFER, 0, 71, 32);
BEHLMAN = OpenDev ("BEHL1350", "");
if (BEHLMAN > 0)
{
gpiberr = ibwrt (BEHLMAN, "CNF", 3L);
fail_flg = GetBehlmanACPSStatus ();
if (fail_flg == PASS)
{
gpiberr = ibwrt (BEHLMAN, "IST", 3L);
fail_flg = GetBehlmanACPSStatus ();
} /* end if */
}
else
{
reterr = MessagePopup ("BEHLMAN AC POWER SUPPLY ERROR","ERROR - DEVICE NOT OPEN !!");
fail_flg = FAIL;
} /* end if */
/* ***{ RESULTS }*** */
return (fail_flg);
} /* end function */

 

0 Kudos
Message 1 of 2
(708 Views)

Hallo kzamora;

Could you define "GPIB to RS232 converter"  more spezific ?. Do you think of a NI GPIB-RS-232 ? 

The NI GPIB-RS232 device is intended to control instruments with GPIB interface from a computer  with only a RS232 interface. So it won't work for your case.

 

And unfortunately your code directly calls the GPIB/IEEE-488.2 driver ( using ibwrt ()) . So it won't work with instruments not attached via GPIB/IEEE-488.2 interface.   

 

0 Kudos
Message 2 of 2
(651 Views)