I feel stupid, but trying to access the CAS section in the iPhone version I only get "NONEXISTANT" as a result when I try "XQT CAS". I have entered "CASFILE" in the alpha register and loaded the MATH module in port 1. What do I do wrong?

regards

3 posts
• Page **1** of **1**

I feel stupid, but trying to access the CAS section in the iPhone version I only get "NONEXISTANT" as a result when I try "XQT CAS". I have entered "CASFILE" in the alpha register and loaded the MATH module in port 1. What do I do wrong?

regards

regards

- arne.skaanes@acm.org
- .
**Posts:**1**Joined:**Sun Jun 27, 2010 3:37 pm

You might have better luck asking your question on the developer web site:

http://alsoftiphone.com/i41CXplus/

http://alsoftiphone.com/i41CXplus/

- makbil
- .
**Posts:**3**Joined:**Sun Apr 25, 2010 1:46 am

AL Software has released a nice application. One has the power of both the HP 41 CX and Reduce at one's finger tips. I have started to work with the two and find that the combination has awesome possibilities.

I first "tasted" RPN with an HP15C and migrated to an HP28S during my university years. This last calculator had features like 32 K of memory, unit conversation, solver, matrices, alphanumeric, list, vectors, etc.. I had loyal services from this beastie well over 20 years. I was disappointed when the clamshell cabling gave way. I found an HP15C emulator for a PDA which was had it merits but the HP41C is yet on another level.

I am just a humble Chemical Engineer with some very basic calculations needs. Quantum Physics or circuit design are not high in my priority list. However it is refreshing to have the possibility to make a quick calculation without the need to turn-on the computer which takes ages to start compared to something like a smartphone. Spreadsheets have also taken some of the edge from handheld calculator but nothing beats a quick and simple result from a ""mini-computer" which, by the way, can also be used as a telephone.

I claim to be still discovering the power of both the 41CX+ and Reduce; nevertheless, I would like to share some of the programs developed to solve some simple tasks. When I have more free time I should look at Warren Furlow's compilation of HP manuals. Thanks to him, our world technical heritage is still alive.

It would be a pleasure to exchange experiences with other users of the 41CX+

Please find below solutions for the following:

• I have tried to be as frugal as possible with the code. I configured the emulator to have 99 storage registers while the rest of the memory is left for programs.

• Revised version of DOCAS to handle hard coded output/input files within calling programs. It can also be used directly as the original version of DOCAS code but the user has the choice of output and input file. Try keeping these to 6 characters to allow them to be stored in a single register.

• The user interface is in 41CX+ and "complex" calculations are made in CAS.

• Bernoulli's equation for a headbox speed calculation. The use of alphanumeric variables in Reduce is used to choose the corresponding coefficient. Keep in mind that we would like to display m/min.

• Statistic calculations with x or x & y data. If we have two variable, gnuplot package is used to plot and numeric package is used to determine the 2nd order polynomial regression for this data set. I must dig around the Reduce packages to find other statistical calculations; however, keep in mind that there is a STATS package module for the 41CX. Choices, choices!

Refined version of DOCAS

01 fLBL CLCAS; Branch to CAS environment

02 SF25

03 FC? 08

04 CASOUT?

05 AON ;XEQ

06 FC? 08

07 PROMT ;XEQ Prompt for output file

08 PURFL ;XEQ Purge

09 ASTO 08 ;Store Output file

10 FC? 08 ;

11 CASIN? ;Input file

12 FC? O8 ;

13 PROMPT ;XEQ Prompt for input file

14 FS? 08 ;

15 ARCL 09 ;Recall Input file

16 APPEND, ;

17 ARCL 08 ;Append Output file

18 AOFF ;XEQ

19 CF25

20 I41CXED ;launch

21 CAS

22 CLA ;Clear A Register

23 ARCL 08 ;Recall Output File

24 I41CXED

25 CF 08

26 END

Bernoulli's Equation

Enter

Wire Speed

Slice opening

Pressure

Result:

l ; Wire Speed

t ; Pressure Speed

z ; Jet Speed

y ; Rush Drag

x ; Jet/Wire Ratio

;

01 fLBL BERNOU;

02 CLST ;XEQ Clear stack

03 Wire? ;ALPHA

04 PROMPT ;XEQ

05 STO 4 ;Store Wire Speed

06 Slice? ;ALPHA

07 PROMPT ;XEQ

08 STO 5 ;

09 Pressure? ;ALPHA

10 PROMPT ;XEQ

11 STO 6

12 PA,KPA,MBAR;

13 AVIEW ;

14 R/S ;

15 MMH2O,CMH2O;

16 AON

17 PROMPT

18 ASTO 7 ;Store Pressure Unit

19 AOFF

20 SF 08 ; Give Input, Output file

21 BERIN;

22 ASTO 09; Store Input File

23 BEROUT;

24 CLCAS; XEQ

25 END

CAS CODE START

% Bernoulli Equation %

load_package(assist)$

on rounded$

define r=data_reg$

vel_c := 0.938$

hb_off := 0$

hb_height := 1000$

gc := {3.60123,3601.23,360.123,35.326,353.16}$

punitt := {"""PA""","""KPA""","""MBAR""","""MMH2O""","""CMH2O"""}$

wire := r(4)$

slice := r(5)$

pressure := r(6)$

punit :={r(7)}$

for k := 1:5 do <<

if not freeof (punit,part(punitt,k)) then j := k >>;

jet := vel_c*SQRT((2*part(gc,j) *(pressure+hb_off))/(1-(slice/hb_height)^2));

jw := jet/wire$

rd := jet-wire$

x_reg := jw$

y_reg := rd$

z_reg := jet$

t_reg := pressure$

l_reg := wire$

write "Wire (m/min) ",wire;

write "Slice (mm) ",slice;

write "Pressure ",punit," ",pressure;

write "Jet/Wire ",jw;

write "Rush Drag ",rd;

CAS CODE END

STATS Program

;Counter is in the form of iiii.fffcc

;iiii = Counter Current Value

;fff = Counter Test Value

;cc = increment value

;51.06001

;

;R11 Ó x

;R12 Ó x2

;R13 Ó y

;R14 Ó y2

;R15 Ó xy

;R16 Number of data points

01 fLBL STATS;

02 ÓREG 11; Set the 6 statistical registers from R11 through R16.

03 CLST ;XEQ Clear stack

04 CF 0 ;Clear Flag 0 Data Exists = 1

05 C ;ALPHA

06 ASTO 03 ;Store Clear Command

07 E ;ALPHA

08 ASTO 04 ;Store Entry Command

09 V ;ALPHA

10 ASTO 05 ;Store View Command

11 S ;ALPHA

12 ASTO 06 ;Store Stop Data Entry Command

13 Y ;

14 ASTO 07 ;Store Y Value Entry

15 50 ;Data Register Index

16 STO 00 ;Index = number of data points

17 RCL IND 00;Indirect Index Recall

18 INT ;Get integer portion

19 STO 1 ;

20 x <> y ;

21 - ;

22 x > 0 ? ;If x is greater than 0

23 SF 0 ;We have data

24 C, E, V? ;ALPHA

25 AON ;ALPHA mode On

26 PROMPT ;XEQ

27 ASTO 02 ;Store Command

28 AOFF ;ALPHA Off

29 RCL02 ;

30 RCL 03 ;Clear Registers

31 x = y? ;Are we clearing registers

32 GTO 00 ;Clear Counter

33 RCL 04 ;Enter Data

34 RCL 02 ;Recall Command

35 x = y? ;Are we entering data

36 GTO 01 ;Enter data

37 RCL 05 ;View Data

38 RCL 02 ;Recall Task

39 x = y ;View Data?

40 GTO 04 ;View Data

41 GTO 05 ;EXIT

;

42 fLBL 00 ;Clear Data CLRGX Clear regs. by X(bbb.eeeii).

43 RCL 01 ;Clear every ii-th reg from Rbbb through Reee

44 1000 ;

45 / ;

46 50.00001 ;

47 + ;Construct bbb.eeeii

48 CLRGX ; XEQ

49 CF 01 ;

50 GTO 05 ;Exit

;

51 fLBL 01 ;

52 SF 1 ;X Values only = 1, X & Y = 0

53 CLÓ ;Clear Statistical Registers

54 50 ;

55 STO 01 ;

56 Y ENTRY? ;ALPHA

57 AON ;ALPHA mode On

58 PROMPT ;XEQ

59 ASTO 02 ;

60 AOFF ;ALPHA Off

61 RCL 02 ;

62 RLC 07 ;Recall Y Entry

63 x=y? ;Will there be Y values?

64 CF 01 ;We have Y values

65 CLST ;Clear Stack

;

66 fLBL 02 ;

67 SF 02 ;Data pointer odd = 1; even = 0

68 S ENTRY ;ALPHA

69 PROMPT ;XEQ

70 ASTO 02 ;

71 RCL 02 ;

72 RCL 06 ;Recall S Entry

73 x=y ;Last Value?

74 GT0 05 ; Exit

75 RDN ;

76 RDN ;

77 1 ;

78 STO + 01 ;

79 RDN ;R Down

80 STO IND 01;Store Data

81 RCL 01 ;

82 2 ;

83 MOD ;

84 x=0 ;

85 CF 02 ;We have even data pointer

86 RDN ;

87 FS? 01 ;Only x values

88 GT0 03 ;

89 FS? 02 ;

90 GTO 02 ;

91 x <> y ;

92 fLBL03 ;

92 Ó+ ;Accumulate first data

93 0.05101 ;

95 RCL 01 ;

96 + ;

97 STO IND 00;

98 GTO 02 ;

;

99 fLBL04 ;

100 0.01001 ;

101 CLRGX ;

102 FC? 00 ;

103 GTO 05 ;

104 SF 08 ; Give Input, Output file name

105 STAIN;

106 ASTO 09; Store Input File

107 STAOUT;

108 CLCAS; XEQ

;

109 fLBL 05 ;

110 CF 0 ;Clear Flag

111 CF 2 ;Clear flag

112 END ;End Program

CAS CODE START

% Max, average, min and sum calcs%

% Curve fitting to 3rd polynomial%

% If Flag 01 is set, only x values%

load_package(gnuplot);

load_package(numeric);

define r=data_reg;

on rounded;

infox_sum := 0$

infoy_sum := 0$

info := {}$

infox := {}$

infoy := {}$

n := fix(r(50))$

x_only := flag_reg(1)$

if x_only=0 then

% We have both x & y values%

<< for k:=51 step 2 until n do

<<xi := r(k);

yi := r(k+1);

infox := xi.infox;

infox_sum := infox_sum + xi;

infoy := yi.infoy;

infoy_sum := infoy_sum + yi;

info := {xi,yi}.info >>;

write "Max X ",t_reg := max(infox);

write "Avg X ", z_reg := infox_sum/((n-50)/2);

write "Min X ",y_reg := min(infox);

write "Sum X ",x_reg := infox_sum;

write "Max Y ",max(infoy);

write "Avg Y ", infoy_sum/((n-50)/2);

write "Min Y ",min(infoy);

write "Sum Y ",l_reg := infoy_sum;

write num_fit(infoy,{1,x,x**2},x=infox);

plot(info,xlabel="X",ylabel="Y",title="Data Points")>>

else

% We have only x values %

<< for k:=51 step 1 until n do

<<xi := r(k);

infox := xi.infox;

infox_sum := infox_sum + xi >>;

write "Max X ",t_reg := max(infox);

write "Ave X ", z_reg := infox_sum/((n-50));

write "Min X ",y_reg := min(infox);

write "Sum X ",x_reg := infox_sum

>>;

CAS CODE END

I first "tasted" RPN with an HP15C and migrated to an HP28S during my university years. This last calculator had features like 32 K of memory, unit conversation, solver, matrices, alphanumeric, list, vectors, etc.. I had loyal services from this beastie well over 20 years. I was disappointed when the clamshell cabling gave way. I found an HP15C emulator for a PDA which was had it merits but the HP41C is yet on another level.

I am just a humble Chemical Engineer with some very basic calculations needs. Quantum Physics or circuit design are not high in my priority list. However it is refreshing to have the possibility to make a quick calculation without the need to turn-on the computer which takes ages to start compared to something like a smartphone. Spreadsheets have also taken some of the edge from handheld calculator but nothing beats a quick and simple result from a ""mini-computer" which, by the way, can also be used as a telephone.

I claim to be still discovering the power of both the 41CX+ and Reduce; nevertheless, I would like to share some of the programs developed to solve some simple tasks. When I have more free time I should look at Warren Furlow's compilation of HP manuals. Thanks to him, our world technical heritage is still alive.

It would be a pleasure to exchange experiences with other users of the 41CX+

Please find below solutions for the following:

• I have tried to be as frugal as possible with the code. I configured the emulator to have 99 storage registers while the rest of the memory is left for programs.

• Revised version of DOCAS to handle hard coded output/input files within calling programs. It can also be used directly as the original version of DOCAS code but the user has the choice of output and input file. Try keeping these to 6 characters to allow them to be stored in a single register.

• The user interface is in 41CX+ and "complex" calculations are made in CAS.

• Bernoulli's equation for a headbox speed calculation. The use of alphanumeric variables in Reduce is used to choose the corresponding coefficient. Keep in mind that we would like to display m/min.

• Statistic calculations with x or x & y data. If we have two variable, gnuplot package is used to plot and numeric package is used to determine the 2nd order polynomial regression for this data set. I must dig around the Reduce packages to find other statistical calculations; however, keep in mind that there is a STATS package module for the 41CX. Choices, choices!

Refined version of DOCAS

01 fLBL CLCAS; Branch to CAS environment

02 SF25

03 FC? 08

04 CASOUT?

05 AON ;XEQ

06 FC? 08

07 PROMT ;XEQ Prompt for output file

08 PURFL ;XEQ Purge

09 ASTO 08 ;Store Output file

10 FC? 08 ;

11 CASIN? ;Input file

12 FC? O8 ;

13 PROMPT ;XEQ Prompt for input file

14 FS? 08 ;

15 ARCL 09 ;Recall Input file

16 APPEND, ;

17 ARCL 08 ;Append Output file

18 AOFF ;XEQ

19 CF25

20 I41CXED ;launch

21 CAS

22 CLA ;Clear A Register

23 ARCL 08 ;Recall Output File

24 I41CXED

25 CF 08

26 END

Bernoulli's Equation

Enter

Wire Speed

Slice opening

Pressure

Result:

l ; Wire Speed

t ; Pressure Speed

z ; Jet Speed

y ; Rush Drag

x ; Jet/Wire Ratio

;

01 fLBL BERNOU;

02 CLST ;XEQ Clear stack

03 Wire? ;ALPHA

04 PROMPT ;XEQ

05 STO 4 ;Store Wire Speed

06 Slice? ;ALPHA

07 PROMPT ;XEQ

08 STO 5 ;

09 Pressure? ;ALPHA

10 PROMPT ;XEQ

11 STO 6

12 PA,KPA,MBAR;

13 AVIEW ;

14 R/S ;

15 MMH2O,CMH2O;

16 AON

17 PROMPT

18 ASTO 7 ;Store Pressure Unit

19 AOFF

20 SF 08 ; Give Input, Output file

21 BERIN;

22 ASTO 09; Store Input File

23 BEROUT;

24 CLCAS; XEQ

25 END

CAS CODE START

% Bernoulli Equation %

load_package(assist)$

on rounded$

define r=data_reg$

vel_c := 0.938$

hb_off := 0$

hb_height := 1000$

gc := {3.60123,3601.23,360.123,35.326,353.16}$

punitt := {"""PA""","""KPA""","""MBAR""","""MMH2O""","""CMH2O"""}$

wire := r(4)$

slice := r(5)$

pressure := r(6)$

punit :={r(7)}$

for k := 1:5 do <<

if not freeof (punit,part(punitt,k)) then j := k >>;

jet := vel_c*SQRT((2*part(gc,j) *(pressure+hb_off))/(1-(slice/hb_height)^2));

jw := jet/wire$

rd := jet-wire$

x_reg := jw$

y_reg := rd$

z_reg := jet$

t_reg := pressure$

l_reg := wire$

write "Wire (m/min) ",wire;

write "Slice (mm) ",slice;

write "Pressure ",punit," ",pressure;

write "Jet/Wire ",jw;

write "Rush Drag ",rd;

CAS CODE END

STATS Program

;Counter is in the form of iiii.fffcc

;iiii = Counter Current Value

;fff = Counter Test Value

;cc = increment value

;51.06001

;

;R11 Ó x

;R12 Ó x2

;R13 Ó y

;R14 Ó y2

;R15 Ó xy

;R16 Number of data points

01 fLBL STATS;

02 ÓREG 11; Set the 6 statistical registers from R11 through R16.

03 CLST ;XEQ Clear stack

04 CF 0 ;Clear Flag 0 Data Exists = 1

05 C ;ALPHA

06 ASTO 03 ;Store Clear Command

07 E ;ALPHA

08 ASTO 04 ;Store Entry Command

09 V ;ALPHA

10 ASTO 05 ;Store View Command

11 S ;ALPHA

12 ASTO 06 ;Store Stop Data Entry Command

13 Y ;

14 ASTO 07 ;Store Y Value Entry

15 50 ;Data Register Index

16 STO 00 ;Index = number of data points

17 RCL IND 00;Indirect Index Recall

18 INT ;Get integer portion

19 STO 1 ;

20 x <> y ;

21 - ;

22 x > 0 ? ;If x is greater than 0

23 SF 0 ;We have data

24 C, E, V? ;ALPHA

25 AON ;ALPHA mode On

26 PROMPT ;XEQ

27 ASTO 02 ;Store Command

28 AOFF ;ALPHA Off

29 RCL02 ;

30 RCL 03 ;Clear Registers

31 x = y? ;Are we clearing registers

32 GTO 00 ;Clear Counter

33 RCL 04 ;Enter Data

34 RCL 02 ;Recall Command

35 x = y? ;Are we entering data

36 GTO 01 ;Enter data

37 RCL 05 ;View Data

38 RCL 02 ;Recall Task

39 x = y ;View Data?

40 GTO 04 ;View Data

41 GTO 05 ;EXIT

;

42 fLBL 00 ;Clear Data CLRGX Clear regs. by X(bbb.eeeii).

43 RCL 01 ;Clear every ii-th reg from Rbbb through Reee

44 1000 ;

45 / ;

46 50.00001 ;

47 + ;Construct bbb.eeeii

48 CLRGX ; XEQ

49 CF 01 ;

50 GTO 05 ;Exit

;

51 fLBL 01 ;

52 SF 1 ;X Values only = 1, X & Y = 0

53 CLÓ ;Clear Statistical Registers

54 50 ;

55 STO 01 ;

56 Y ENTRY? ;ALPHA

57 AON ;ALPHA mode On

58 PROMPT ;XEQ

59 ASTO 02 ;

60 AOFF ;ALPHA Off

61 RCL 02 ;

62 RLC 07 ;Recall Y Entry

63 x=y? ;Will there be Y values?

64 CF 01 ;We have Y values

65 CLST ;Clear Stack

;

66 fLBL 02 ;

67 SF 02 ;Data pointer odd = 1; even = 0

68 S ENTRY ;ALPHA

69 PROMPT ;XEQ

70 ASTO 02 ;

71 RCL 02 ;

72 RCL 06 ;Recall S Entry

73 x=y ;Last Value?

74 GT0 05 ; Exit

75 RDN ;

76 RDN ;

77 1 ;

78 STO + 01 ;

79 RDN ;R Down

80 STO IND 01;Store Data

81 RCL 01 ;

82 2 ;

83 MOD ;

84 x=0 ;

85 CF 02 ;We have even data pointer

86 RDN ;

87 FS? 01 ;Only x values

88 GT0 03 ;

89 FS? 02 ;

90 GTO 02 ;

91 x <> y ;

92 fLBL03 ;

92 Ó+ ;Accumulate first data

93 0.05101 ;

95 RCL 01 ;

96 + ;

97 STO IND 00;

98 GTO 02 ;

;

99 fLBL04 ;

100 0.01001 ;

101 CLRGX ;

102 FC? 00 ;

103 GTO 05 ;

104 SF 08 ; Give Input, Output file name

105 STAIN;

106 ASTO 09; Store Input File

107 STAOUT;

108 CLCAS; XEQ

;

109 fLBL 05 ;

110 CF 0 ;Clear Flag

111 CF 2 ;Clear flag

112 END ;End Program

CAS CODE START

% Max, average, min and sum calcs%

% Curve fitting to 3rd polynomial%

% If Flag 01 is set, only x values%

load_package(gnuplot);

load_package(numeric);

define r=data_reg;

on rounded;

infox_sum := 0$

infoy_sum := 0$

info := {}$

infox := {}$

infoy := {}$

n := fix(r(50))$

x_only := flag_reg(1)$

if x_only=0 then

% We have both x & y values%

<< for k:=51 step 2 until n do

<<xi := r(k);

yi := r(k+1);

infox := xi.infox;

infox_sum := infox_sum + xi;

infoy := yi.infoy;

infoy_sum := infoy_sum + yi;

info := {xi,yi}.info >>;

write "Max X ",t_reg := max(infox);

write "Avg X ", z_reg := infox_sum/((n-50)/2);

write "Min X ",y_reg := min(infox);

write "Sum X ",x_reg := infox_sum;

write "Max Y ",max(infoy);

write "Avg Y ", infoy_sum/((n-50)/2);

write "Min Y ",min(infoy);

write "Sum Y ",l_reg := infoy_sum;

write num_fit(infoy,{1,x,x**2},x=infox);

plot(info,xlabel="X",ylabel="Y",title="Data Points")>>

else

% We have only x values %

<< for k:=51 step 1 until n do

<<xi := r(k);

infox := xi.infox;

infox_sum := infox_sum + xi >>;

write "Max X ",t_reg := max(infox);

write "Ave X ", z_reg := infox_sum/((n-50));

write "Min X ",y_reg := min(infox);

write "Sum X ",x_reg := infox_sum

>>;

CAS CODE END

- elzorro
- .
**Posts:**1**Joined:**Sun Jun 09, 2013 5:30 pm

3 posts
• Page **1** of **1**

Users browsing this forum: Semrush [Bot] and 1 guest