![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Feb 2007
Location: House
Posts: 95
|
RSView32 VBA Excel
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 |
|
|
|
#2 | |
|
Member
|
Quote:
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 by Gil47; September 20th, 2008 at 04:15 AM. |
|
|
|
|
#3 | |
|
Member
|
Quote:
|
|
|
|
|
#4 |
|
Member
![]() Join Date: Feb 2007
Location: House
Posts: 95
|
I found the solution. See technote 47066 from AB knowledgebase. It corrected both problem 1 and 2.
Thanks |
|
|
|
#5 |
|
Member
![]() Join Date: Aug 2009
Location: MH
Posts: 18
|
Solution in FTView??
gTagDB.gettag is for RSView....
Can anyone suggest similar thing for FTView...... |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Control RSView32 Display From VBA | rickj | LIVE PLC Questions And Answers | 4 | February 14th, 2008 04:23 PM |
| RSView32 dbf to an excel report | Marie1982 | LIVE PLC Questions And Answers | 17 | September 12th, 2007 12:51 AM |
| Write RSView32 Data tags to SQL trough VBA code | julianelizondo | LIVE PLC Questions And Answers | 1 | June 20th, 2006 03:41 PM |
| Access VBA into RSView32 VBA | Bob O | LIVE PLC Questions And Answers | 6 | February 16th, 2004 05:25 AM |
| Looping VBA code in Excel | pagewe | LIVE PLC Questions And Answers | 8 | February 10th, 2003 10:19 AM |