-
FlexPro
- Zoom sur FlexPro
- Fonctionnalités & Options
- Domaines d’application
- Tous les avantages
- Nouveau dans FlexPro 2021
- Testez FlexPro gratuitement
- FlexPro View OEM Freeware
- Conseils d’achat
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produits
- News
- Support
- Société
- Emplois
- Contact
- Login
- Langue
- +49 6894 929600
- infoweisang.com
- Google Maps
Copy signals to data matrix
Accueil > Community > Automation and VBA > Copy signals to data matrix
- This topic has 7 replies, 2 voices, and was last updated 18 years, 10 months ago by norbert.bakkers@lr.org.
-
AuthorPosts
-
January 6, 2006 at 7:54 pm #12426norbert.bakkers@lr.orgParticipant
I need to perform some matrix manipulations on the data of 4 signals. To do this I need to copy the contents of the signals in a matrix.
The signal (‘1’) has the following form:
Signal with 24,000 64-bit floating pointsThe matrix (‘DataMatrix’) has the folowing form:
Data matrix with 4 data series with 24,000 64-bit floating point values eachI copy the data using:
ActiveDatabase.RootFolder.Object(“DataMatrix”).FillColumns “‘1′”, fpDataComponentY, , , 1, 1This produces the error:
A change of values is not possible. The following error has occured: wrong data type. The process has been canceled
If try to copy the number 1 to the matrix using FillColumns “1” then there is no problem.
How should I copy the signals to the data matrix?
January 6, 2006 at 7:54 pm #8107norbert.bakkers@lr.orgParticipantI need to perform some matrix manipulations on the data of 4 signals. To do this I need to copy the contents of the signals in a matrix.
The signal (‘1’) has the following form:
Signal with 24,000 64-bit floating pointsThe matrix (‘DataMatrix’) has the folowing form:
Data matrix with 4 data series with 24,000 64-bit floating point values eachI copy the data using:
ActiveDatabase.RootFolder.Object(“DataMatrix”).FillColumns “‘1′”, fpDataComponentY, , , 1, 1This produces the error:
A change of values is not possible. The following error has occured: wrong data type. The process has been canceled
If try to copy the number 1 to the matrix using FillColumns “1” then there is no problem.
How should I copy the signals to the data matrix?
January 6, 2006 at 8:34 pm #8704Bernhard KantzParticipantUnfortunately we can’t reproduce your problem. Your code works with the latest version of FlexPro.
Please download the latest version and try it again.January 6, 2006 at 10:36 pm #8705norbert.bakkers@lr.orgParticipantI’ve downloaded and installed the 30 day evaluation version.
I removed version 6 from my pc first. Is it possible to have both versions installed at the same time?
After opening my project in version 7, I got the message as indicated in the attached picture. Does this problem only occur in the evaluation version, or would I also have this problem in the professional version?
After this error message, Flexpro crashed with an exeption access violation.Is an alternative method available in version 6 to load the signals in the matrix?
January 6, 2006 at 11:30 pm #8706Bernhard KantzParticipantYou can install both FlexPro6 and FlexPro7 at the same time.
But you can only open FlexPro Demo Databases with the demo version which are not older than 30 days. This is a limitation of the demo version. With FlexPro 7 Standard or Professional you can open FlexPro6 databases.Your code also works with FlexPro 6.0.35.
Is an alternative method available in version 6 to load the signals in the matrix?
You could create a FPScript formula to calculate the new matrix:
Dim d
d = DataMatrix
d[0] = ‘1’
return d
January 9, 2006 at 8:21 pm #8707norbert.bakkers@lr.orgParticipantI have created a small Flexpro file that includes a VBA programme to fill a data matrix using the ‘FillColumn’ statement. I have used in version 6.0.35 and version 7 and also using version 6.0.33 on a different machine. All versions crashed the same way as described previously. (computer is Compaq Evo P4 2.4 GHz and XP Professional SP2)
The file also includes a formula that tries to fill the matrix using a FPScript. I have tried to fill ‘DataMatrix’ (Signal series with 4 signals) and ‘DataMatrix2’ (Data matrix with 4 data series). They both crash (in version 6.0.35 and 7) with the message ‘Signals cannot be used on the right side of an indexed assignment. Assign the components seperately.’
I solve this by recording a macro whilest filling the matrix by hand. However, this option would be too slow to implement in the programme.
Please advise how to solve this problem!!January 9, 2006 at 9:09 pm #8708Bernhard KantzParticipantIf you want to copy the values of a signal into a signal series you have to copy the components of the signal seperately.
Copy the y-values of the signal into the first column of the signal series:
Dim oDataset As DataSet
Set oDataset = ActiveDatabase.RootFolder.Object(“DataMatrix”, fpObjectTypeDataSet)
oDataset.FillColumns “‘1’.y”, fpDataComponentY, , , 1, 1
oDataset.FillColumns “‘1’.x”, fpDataComponentX, , , 1, 1
The equivalent FPScript formula is:
Dim d
d = DataMatrix
d.y[0] = ‘1’.y //Copy y-values
d.x = ‘1’.x //Copy x-values
return d
January 9, 2006 at 9:29 pm #8709norbert.bakkers@lr.orgParticipantThank you very much! It works perfect now.
-
AuthorPosts
- You must be logged in to reply to this topic.