You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old September 19th, 2008, 03:37 PM   #1
Marie1982
Member
Canada

Marie1982 is offline
 
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
  Reply With Quote
Old September 20th, 2008, 03:59 AM   #2
Gil47
Member
New Zealand

Gil47 is offline
 
Gil47's Avatar
 
Join Date: Apr 2007
Location: South Island, NewZealand
Posts: 1,149
Quote:
Originally Posted by Marie1982
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 by Gil47; September 20th, 2008 at 04:15 AM.
  Reply With Quote
Old September 20th, 2008, 07:10 AM   #3
robertmee
Member
United States

robertmee is offline
 
robertmee's Avatar
 
Join Date: Feb 2008
Location: NC
Posts: 795
Quote:
Originally Posted by Marie1982
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.
  Reply With Quote
Old September 22nd, 2008, 01:14 PM   #4
Marie1982
Member
Canada

Marie1982 is offline
 
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
  Reply With Quote
Old August 12th, 2009, 06:55 AM   #5
paragmangale
Member
India

paragmangale is offline
 
Join Date: Aug 2009
Location: MH
Posts: 18
Solution in FTView??

gTagDB.gettag is for RSView....
Can anyone suggest similar thing for FTView......
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 09:33 AM.


.