RSView32 VBA Excel

Marie1982

Member
Join Date
Feb 2007
Location
House
Posts
121
Hi,

I have 2 problems.

1- I have an RSView32 application which contains a memory tag defined with these parameters:

Min: 0
Max: 2
Scale: 0.01
Offset: 0
Data type: Default

On my display I have a numeric input with these parameters:

Field lenght: 20
Decimal places: 7
Format: floating point
Overflow: show exponent

In runtime, if I try to enter 0.5 i get the error "Attempted to download invalid floating point number '0.5', index 1"

Why and how do I correct this?

Problem #2

I use a bunch of tags defined in the same way than those en problem #1 to put in a Excel report via VBA code. I also get system values to know the time and date. Finally I also have a digital tag.

Here is how I get the values from RSView in my VBA code:

Dim tag(14) As tag

Set tag(0) = gTagDb.GetTag(sPoste & "\Rapport" & "\Chlore")
Set tag(1) = gTagDb.GetTag(sPoste & "\Rapport" & "\Debit")
Set tag(2) = gTagDb.GetTag(sPoste & "\Rapport" & "\Volume")
Set tag(3) = gTagDb.GetTag(sPoste & "\Rapport" & "\Turbidite1")
Set tag(4) = gTagDb.GetTag(sPoste & "\Rapport" & "\Turbidite2")
Set tag(5) = gTagDb.GetTag(sPoste & "\Rapport" & "\Turbidite3")
Set tag(6) = gTagDb.GetTag(sPoste & "\Rapport" & "\Turbidite4")
Set tag(7) = gTagDb.GetTag(sPoste & "\Rapport" & "\Filtre")
Set tag(8) = gTagDb.GetTag(sPoste & "\Rapport" & "\pH")
Set tag(9) = gTagDb.GetTag(sPoste & "\Rapport" & "\Temperature")
Set tag(10) = gTagDb.GetTag("system\Month")
Set tag(11) = gTagDb.GetTag("system\DayOfMonth")
Set tag(12) = gTagDb.GetTag("system\Hour")
Set tag(13) = gTagDb.GetTag("system\Year")

When I write those tags in my excel file, I get all the system tags and digital tags ok, but the analog tags are always 0.

I found that the system tags are defined as Unsigned integer. I changed one of my tags to that data type and then it was ok. I tried floating point but got the same result, always 0. How can I get floating point values???

Thanks for your help.

Marie
 
Marie1982 said:
Hi,

1- I have an RSView32 application which contains a memory tag defined with these parameters:

Min: 0
Max: 2
Scale: 0.01
Offset: 0
Data type: Default

On my display I have a numeric input with these parameters:

Field lenght: 20
Decimal places: 7
Format: floating point
Overflow: show exponent

In runtime, if I try to enter 0.5 i get the error "Attempted to download invalid floating point number '0.5', index 1"

Why and how do I correct this?
Thanks for your help.

Marie


As a guess for question 1.
At run time try entering the value 50 and see if it displays as 0.50
as any number you enter may only be seen as a signed or unsigned integer that needs scaled by 0.01
 
Last edited:
Marie1982 said:
Hi,

I have 2 problems.

1- I have an RSView32 application which contains a memory tag defined with these parameters:

Min: 0
Max: 2
Scale: 0.01
Offset: 0
Data type: Default

On my display I have a numeric input with these parameters:

Field lenght: 20
Decimal places: 7
Format: floating point
Overflow: show exponent

In runtime, if I try to enter 0.5 i get the error "Attempted to download invalid floating point number '0.5', index 1"

Why and how do I correct this?

I set this up exactly the same on a test screen and I do not get the error and it accepts .5 w/ no problems.
 

Similar Topics

Good friends, I'm new to the forum, I'm working with RSview32, someone can help me how to make a macro in VBA, to save some data in Excel. to...
Replies
6
Views
1,947
We were given RSView32 project files, for quoting, that will be converted to FTView SE. Unfortunately the project has VBA references that were...
Replies
9
Views
4,312
Hi, I got a RSview32 project from site with VBA scripts and trying to run on my local machine to make some graphical changes. VB scripts are used...
Replies
6
Views
3,487
Please somebody upload this manual on another site or forward me 51770 - Sample VBA: Exercise in migrating an RSView32 application with VBA to...
Replies
8
Views
4,906
Hello all, New to the forums here and glad to find this oasis of RSView/FactoryTalk info! I have a basic VB question I hope can be answered...
Replies
4
Views
2,306
Back
Top Bottom