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
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