LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to talk using GPIB to a Prodicon Controller on a Weiss Environmental chamber.

I am using CVI 8.1 with a GPIB-232CT-A in S Mode to talk to a Weiss Technik Environmental Chamber which has a Prodicon Controller fitted to it. As it is an old cabinet the manufacturers have "very little to none" information on the GPIB commands. I was wondering if anybody has an GPIB commands or experience in talking to a Prodicon controller on a Weiss / Gallenkamp / Votsch etc cabinet. Any help, pointers, ideas, previous experience with the Prodicon etc would be very, very much appreciated.
0 Kudos
Message 1 of 9
(5,310 Views)
Hi there,
 
Unfortunately I do not know any GPIB commands that you can send to the Prodicon controller.  I've done a quick search for a command set and didn't come up with anything.  However if you do manage to find some commands, here is a link to the NI Instrument Driver Network to get started or help on creating your own drivers:
 
Regards,
Way S.
NI UK Applications Engineer
0 Kudos
Message 2 of 9
(5,274 Views)
A collegue of me did write a driver for a Weiss//Prodicon cabinet 12 years ago for inhouse use.  I'll attach the source code here. But  I don't know if it works, because I never used it.
As you see the code depends on the layout of the control word. If the code doesn't work, you will need to get documentation for the layout of the control word for your chamber.  We've made the experience with  Weiss/AMR  cabinets that there were small differences even for same chamber/controler combinations.      
0 Kudos
Message 3 of 9
(5,247 Views)
Thank you for posting the driver for communicating with the cabinet, I will have a look and let you know the outcome. Weiss/Prodicon does not have any documentation showing the layout of the GPIB command which is why I posted the message, so hopefully there is enough information in the driver you have sent.
0 Kudos
Message 4 of 9
(5,242 Views)
I have now got the required temperature and humidity working, thank you to Markus for sending the drivers.
0 Kudos
Message 5 of 9
(5,212 Views)
Hi,

i also have here an old Weiss climatic exposure test cabinet (305SB/+10IU/80DU) with a Prodicon controller. Walkers, you said you succesfully get it to work. But, I dont know how to get this thing to wokr, maybe you could send me a Labview project where the driver is included.

Regards
Malte
0 Kudos
Message 6 of 9
(4,812 Views)

Hello Malte

I eventually found the following code in CVI worked.

#include <ansi_c.h>
#include <rs232.h>
#include <utility.h>
#include <formatio.h>
#include "RS232-GPIB.h"

#define COM_PORT 4
#define COM_PORT_TEXT "COM4"

static int panelHandle;

int ComError,BytesWritten;
int BytesRead;
char databuf[120];
char Status[100]; /*GPIB Status*/
char GPIBerr[100]; /*GPIB Error number*/
char SPerr[100]; /*Serial Port Error number*/
char count[5]; /*Byte count or reads or writes*/

double temperature;
int humidity;

void CheckGPIBError (void); /**Currently UnUsed!**/
void ReadAllStatus(void);

int main (int argc, char *argv[])
{
 if (InitCVIRTE (0, argv, 0) == 0)
  return -1; /* out of memory */
 if ((panelHandle = LoadPanel (0, "RS232-GPIB.uir", PANEL)) < 0)
  return -1;
 DisplayPanel (panelHandle);
 RunUserInterface ();
 DiscardPanel (panelHandle);
 return 0;
}

int CVICALLBACK INITIALIZE (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
 {
  case EVENT_COMMIT:
   ComError = OpenComConfig(COM_PORT,COM_PORT_TEXT,9600,0,8,1,512,512);
   ReturnRS232Err();
   ComError=SetCTSMode(COM_PORT,1);
   ReturnRS232Err();
   BytesWritten = ComWrt(COM_PORT, "onl 0\r" ,6);
   Delay(1);
   BytesWritten = ComWrt(COM_PORT,"onl 1\r",6);
   Delay(1);

   Delay(1);
   FlushInQ (COM_PORT);
   
   BytesWritten = ComWrt(COM_PORT,"onl 1\r",6);
   CheckGPIBError();
   SetCtrlAttribute (panelHandle, PANEL_INITIALIZE, ATTR_DIMMED, 1); 
   SetCtrlAttribute(panelHandle, PANEL_TIMER, ATTR_ENABLED, 1);
   
   break;
 }
 return 0;
}

int CVICALLBACK TIMER (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
 {
  case EVENT_TIMER_TICK:
   //Open Comm Port
   
   BytesWritten = ComWrt(COM_PORT,"wrt 3\n*IDN?\r\n",13);
    CheckGPIBError();   // Miss out of main program
   BytesWritten = ComWrt(COM_PORT,"rd #70 3\r\n",10);
   BytesRead = ComRdTerm (COM_PORT, databuf, 100, 13);
    CheckGPIBError();
   
   //Fmt(databuf,"%s<%s"," 32.5F49P0>CT: 32.53C1 rh:49%10T 24.3"); These are examples of the string that is returned from the cabinet
   //Fmt(databuf,"%s<%s","-31.9F 0P0>CT:-31.93C0        0T 24.3");
   Scan(databuf,"%s>%fF%i",&temperature, &humidity);
   SetCtrlVal(panelHandle, PANEL_Temp, temperature);
   SetCtrlVal(panelHandle, PANEL_rh, humidity);
   break;
 }
 return 0;
}

int CVICALLBACK EXIT (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
 {
  case EVENT_COMMIT:
   // Close COMM PORT
   SetCtrlAttribute(panelHandle, PANEL_TIMER, ATTR_ENABLED, 0);
   ComError=CloseCom (COM_PORT);
   ReturnRS232Err();
   QuitUserInterface (0);
   break;
 }
 return 0;
}

void CheckGPIBError (void)
{
 int GPIBErrCode;
 int hexStat;
 int InQLen;

 Delay (0.1);
 FlushInQ (COM_PORT);

 BytesWritten = ComWrt (COM_PORT, "stat n\r", 7);
 InQLen = GetInQLen (COM_PORT);
 while (InQLen < 4)
  InQLen = GetInQLen (COM_PORT);
 ReadAllStatus();
 Scan (Status, "%s>%d", &hexStat);
 Scan (GPIBerr, "%s>%d", &GPIBErrCode);
 if (hexStat < 0)
 {
  printf("GPIB Error: GPIB error code = %d\n", GPIBErrCode);
  exit (0);
 }
}

void ReadAllStatus(void)
{
 BytesRead = ComRdTerm (COM_PORT, Status, 10, 13);
 BytesRead = ComRdTerm (COM_PORT, GPIBerr, 5, 13);
 BytesRead = ComRdTerm (COM_PORT, SPerr, 5, 13);
 BytesRead = ComRdTerm (COM_PORT, count, 5, 13);
}

Hope this helps

Paul

0 Kudos
Message 7 of 9
(4,788 Views)
Hi,

thanks for your fast reply. Im trying to get this to work, but i never heard of cvi files till today. But i havent found anything yet, maybe i cant do this cause i only have a student license. Im trying to do this like described here:
http://zone.ni.com/devzone/cda/tut/p/id/3164
but i cant find this program part..

In the code, you worked with RS232. What do you think, is it possible to get it to work with a normal USB<->GPIB connector?

Malte
0 Kudos
Message 8 of 9
(4,785 Views)
Hi Malte
 
It was done in Labwindows/CVI not LabView.
I have never tried to program through a USB <> GPIB, but it did work through the RS232
 
Paul
0 Kudos
Message 9 of 9
(4,778 Views)