I can't read outputs with ReadOutputPoint( long ByteIndex,long BitIndex,...)

MariaCH

Member
Join Date
May 2009
Location
Granada
Posts
1
I am working on a project with ProSim V5.4 COM Object. I am using C++ .NET under Windows XP 32 bits. I can connect to PLC-Sim, and also I can change the states, disconnect from the PLC-Sim, etc. However, when I try to read any output or flag, I just can`t get the expected result, the pointer pData is empty.

I am sure that "ByteIndex" and "BitIndex" are ok, but the function does not return anything in "pData".

The snippet below shows how I am using this function:

********************************************************
S7ProSim^ proSim = gcnew S7ProSim();

System::Boolean^ PLCSimModel::ReadOutput(int byteAddress, int bitAddress)
{
System::Object^ aux = gcnew System::Object();
System::Boolean^ value;

proSim->ReadOutputPoint((int)byteAddress,(int)bitAddress,PointDataTypeConstants::S7_Bit,aux);

value= gcnew System::Boolean(Convert::ToBoolean(aux));

return(value);
}

********************************************************

Any ideas about why this does not work?

Thanks.
 

Similar Topics

Hello, I am trying to write a program to simulate an ISSC IPC90. The IPC90 has some internal variables, I think the correct name is 'internal...
Replies
7
Views
1,838
Greetings, I am trying to write a FB where I can simply dictate a start address of an input as an IN parameter and a start address of an output...
Replies
24
Views
5,245
Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
172
Is there a way to use the FAL instruction to do +=2 instead of +=1? I have an array that is organized with alternating "data" and "flag" values...
Replies
5
Views
131
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
268
Back
Top Bottom