Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer embedded C code question
From: Eric Norum <norume@aps.anl.gov>
To: Jiro Fujita <jiro.fujita@gmail.com>
Cc: tech-talk@aps.anl.gov
Date: Thu, 29 Jun 2006 15:52:48 -0500
I'm not sure what you have changed, but the code you posted originally seems to be mixing up the notion of "array of characters" and "pointer to character".  See my comment below:

program snchygrometer

%%#include <ctype.h>
%%#include <stdlib.h>
%%#include <stdio.h>

  %%char rob[10] ;
  char *roba;
  assign roba to "rawdata" ;
  monitor roba ;
  float ch1 ;
  float ch2 ;
  float ch3 ;
  float ch4 ;
  float ch5 ;
  assign ch1 to "PV1";
  assign ch2 to "PV2";
  assign ch3 to "PV3";
  assign ch4 to "PV4";
  assign ch5 to "PV5";

  int v ;
  float z ;
  %%extern char *wa1 ;
  %%char *sign="+-" ;

%{
  rob=&roba                 <<<<<<<<<<<<< EVEN WITH A SEMICOLON AT THE  END THIS LINE MAKES NO SENSE.
  v=rob[0];                 /*Get first char from string*/
  wa1=strpbrk(rob, "+-");   /*Break string at +-,rest is wa1*/
  z=(float)wa1;             /*convert string to float z*/
 }%


Perhaps you could mail me your latest code??

-- 
Eric Norum <norume@aps.anl.gov>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793



Replies:
Re: Sequencer embedded C code question Jiro Fujita
References:
Re: Sequencer embedded C code question Jiro Fujita
RE: Sequencer embedded C code question Laznovsky, Michael
Re: Sequencer embedded C code question Jiro Fujita

Navigate by Date:
Prev: Re: Sequencer embedded C code question Jiro Fujita
Next: Re: Sequencer embedded C code question Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Sequencer embedded C code question Jiro Fujita
Next: Re: Sequencer embedded C code question Jiro Fujita
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·