How to program analog inputs PS4

Elektron21

Member
Join Date
Sep 2006
Location
Gent
Posts
2
hi

i have a PS4-201-MM1 with 2 analog inputs en 1 analog output.

How can I program the analog inputs and output, with the PS4 software? I have a demo version of PS4
 
Not sure what version of Sucosoft the demo version is based on. I have Sucosoft 5.


First you would make a new topology configuration using the topology editor. Select the PS4-201-MM1 as the processor.

Then you would create your first POU and it asks you if you want to generate variables from the topology. When you say yes, it will put variables in the global section of the POU for all hardware I/O points. The names are blank but the addresses are there.

The inputs are addressed %IAW0.0.0.0, %IAW0.0.0.2, %IAW0.0.0.4, %IAW0.0.0.6. Note that all word addresses have to be even. I think the first two addressed analog values refer to the pots on the front of the controller under the cable connectinos. The the hardware ones would be ...4 adn ...6. Although I could have that reversed.

Tha address for the analog output is %QAW0.0.0.0

The inputs are 10 bits and will read 0 to 1023 for 0 to 10V. The output is 12 bits and so you set it at 0 to 4095 for 0 to 10V out.

Hope that helps.
 
I use Socosoft S40 5.00. I tried to create an POU, but I got Errors. A sample of my code:

VAR
Converter: DataScale;
Start AT %I0.0.0.0.0: BOOL;
Analog_Input AT %IAW0.0.0.4: INT;
Analog_Output AT %QAW0.0.0.0: INT;
Continuation AT %I0.0.0.0.1: INT;
Range_Error AT %I0.0.0.0.2: USINT;
Parameter_Error AT %I0.0.0.0.3: USINT;
END_VAR

CAL Converter (Set := Start,
InputValue := Analog_Input,
InputRangeBegin := 200,
InputRangeEnd := 400,
OutputRangeBegin := 200,
OutputRangeEnd := 4000,
OutputLimitLow := 250,
OutputLimitHigh := 3800
|
Analog_Output := OutputValue,
Range_Error := Status,
Parameter_Error := Error)

LD Analog_Output
ST Continuation

Where does it go wrong? I used a sample of the help file
 
Take a look at this sample:

DataScaleSample.jpg


Your addressing is wrong. In the sample, only the Start and AnalogInput values are defines as inputs. The rest are just internal memory. You only need to give addresses for the hard I/O points... (You can also assign addresses to internal memory which is called markers. These are used to setup communications between other devices such as HMI's and the PLC).

Anyway, you should try to use the example exactly as given, including all of the addressing of variables..

Good Luck,
 

Similar Topics

Hello, the PLC in question is 1769-L30ER. I have a local 4-20mA Analog Output module (1769-OF4CI), and also a remote ethernet PointIO analog...
Replies
0
Views
396
Curious, is it common to program in offsets to calibrate/correct analog sensor readings in certain applications? As an example, I have a couple...
Replies
11
Views
3,084
Hi Guys, How is Analog 4-20mA Level sensor Programmed in CLICK software of Automation Direct? Which Instruction set.
Replies
5
Views
2,218
this is my first time using the analog programming . i want to take the input from the thermocouple and display it, I'm using step7 and plc...
Replies
0
Views
1,121
Help with a program setup. I am using a micrologix 1400 and inputting a 0-10VDC analog signal. My application is a part width measurement. The...
Replies
3
Views
1,877
Back
Top Bottom