Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
QuestionExtract RSAParameters from custom Private Key Pin
Member 1508150323-Feb-21 21:09
Member 1508150323-Feb-21 21:09 
AnswerRe: Extract RSAParameters from custom Private Key Pin
Gerry Schmitz24-Feb-21 8:50
mveGerry Schmitz24-Feb-21 8:50 
GeneralRe: Extract RSAParameters from custom Private Key Pin
Member 1508150324-Feb-21 18:33
Member 1508150324-Feb-21 18:33 
AnswerRe: Extract RSAParameters from custom Private Key Pin
Member 1508430525-Feb-21 15:42
Member 1508430525-Feb-21 15:42 
QuestionUsing azure storage account to share file with multiple users Pin
Lmathew22-Feb-21 19:06
Lmathew22-Feb-21 19:06 
AnswerRe: Using azure storage account to share file with multiple users Pin
Gerry Schmitz22-Feb-21 19:11
mveGerry Schmitz22-Feb-21 19:11 
QuestionAsync task Pin
Kenneth Haugland20-Feb-21 6:01
mvaKenneth Haugland20-Feb-21 6:01 
QuestionRe: Async task Pin
Eddy Vluggen20-Feb-21 12:51
professionalEddy Vluggen20-Feb-21 12:51 
AnswerRe: Async task Pin
Kenneth Haugland20-Feb-21 23:57
mvaKenneth Haugland20-Feb-21 23:57 
GeneralRe: Async task Pin
Dave Kreskowiak21-Feb-21 5:10
mveDave Kreskowiak21-Feb-21 5:10 
GeneralRe: Async task Pin
Kenneth Haugland21-Feb-21 8:10
mvaKenneth Haugland21-Feb-21 8:10 
GeneralRe: Async task Pin
Richard Deeming21-Feb-21 22:19
mveRichard Deeming21-Feb-21 22:19 
GeneralRe: Async task Pin
Kenneth Haugland22-Feb-21 6:58
mvaKenneth Haugland22-Feb-21 6:58 
GeneralRe: Async task Pin
Richard Deeming21-Feb-21 22:19
mveRichard Deeming21-Feb-21 22:19 
GeneralRe: Async task Pin
Dave Kreskowiak22-Feb-21 3:42
mveDave Kreskowiak22-Feb-21 3:42 
Questionc# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge18-Feb-21 22:00
Roberto64_Ge18-Feb-21 22:00 
AnswerRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff18-Feb-21 22:38
mveOriginalGriff18-Feb-21 22:38 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 0:24
Roberto64_Ge19-Feb-21 0:24 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff19-Feb-21 0:55
mveOriginalGriff19-Feb-21 0:55 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 1:41
Roberto64_Ge19-Feb-21 1:41 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff19-Feb-21 1:58
mveOriginalGriff19-Feb-21 1:58 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 2:28
Roberto64_Ge19-Feb-21 2:28 
My goal is only to pass to a RsiOpc.dll (from Rockwell) routine SyncWrite a number (or an array of them) that have only to be transferred to a PLC.
When I used integers i never had a problem. Now I would like to use decimal (I simply mean numbers with comma).
Then as I said I used also (what follows I took from the code directly, the samples I posted before are translated from italian where array_to_send is array_da_inviare)

C#
r.array_da_inviare_D[0] = (float)(2 * Math.Cos((2 * (1.0 / periodo_sinusoide[0]) * Math.PI) * sec_tot));


Why this doesn't generate the problem? There are decimal,integers mixed and the result is a double as you say and in fact I converted everything to float to pass the value to array_da_inviare[0]

What I need to do is, instead of a sine wave, send just a value (at any cycle) that is the result of a second order filter
The filter formula is coming from its Laplace representation in S then passes into the discrete transformation Z and at the end becomes a quite easy formula being an algebric sum of some variables multiplied by some factors and divided by other factors. The result is simply another number that must transitate to a PLC. The real formula is exactly that of the second sample code. Just nothing more than this.

Meanwhile I convered filter and force array from float to decimal. So now code is:

C#
decimal filter_result;
filter_result = filter();
r.array_da_inviare_D[0] = (float) (filter_result);


but also this way I have the problem

modified 19-Feb-21 8:36am.

GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 8:27
Roberto64_Ge19-Feb-21 8:27 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge23-Feb-21 0:53
Roberto64_Ge23-Feb-21 0:53 
QuestionWinforms Usercontrol Databinding question Pin
Member 1501196518-Feb-21 5:20
Member 1501196518-Feb-21 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.