noob hello world!

Kamputty

Member
Join Date
Nov 2018
Location
Santa Cruz
Posts
16
Hi all,

I'm writing my first PLC ladder program, and I seem to be hitting a wall!

I have an analog input module (1769-IF8), that I am using for 4/20mA processing. I can "read" the values on "Local:4:I.Ch0Data". This value is am integer value. I see it moving correctly.

The issue is that i'm trying to copy that data into a variable, but alas, the data does not get copied there!

I tried a "mov" command
I tried a "add" command adding zero
so far, everything I do, I cannot copy that data into a working variable.
The working variable is "public"...

thoughts?!

Any suggestions would be greatly appreciated!

~Kam
 
Welcome....

You would be better off zipping your file and posting your logic or even a screenshot

The MOVe should be fine but a lot more details are un-answered
 
Welcome....

You would be better off zipping your file and posting your logic or even a screenshot

The MOVe should be fine but a lot more details are un-answered

Thanks for the quick response! I'll try to provide all the details as needed.

I've attached a pdf showing the offending rung, its the first command (mov). the data from the "localxxxx" is reading correctly, I just cannot MOVe it to the temp variable!

~Kam
 
Kamputty,

Taking a quick look at the PDF it appears your PLC is in Program mode (top left corner of Studio 5000). Set it to Run and see if that works.
 
the PLC is running, I was NOT when I took the screen shot. I can see the data changing when I'm viewing the variables. It is just not copying the values...everything else is updating...
 
Welcome to the forum.

There are many things that it COULD be. A screenshot of the rung, attached to a post would be very helpful to us.

Since you can see the value of LOCAL:4:I.... change, you are probably online with the processor. (You'd be surprised how many 1st time posters we get who miss that one).

The MOV instruction is probably the best to start with. There are a couple ways that this could be failing:

1) The rung hasn't been compiled. When you look at the left-hand side of your rung with the instruction MOV(Local:4:I.Ch0Data, MyTag), are there a bunch of little 'i's, or is it one big vertical green bar?

2) The rung isn't being scanned. Is the rung in a Routine, and is that Routine in something like "MainRoutine", and has a little page with a blue '!' on it when you look at it in the "Controller Organizer" tree? Alternatively, is there a JSR instruction that calls the Routine from such a "MainRoutine"? Similar question involving "Program" and "Task". Zipping your program and attaching it would be helpful.

3) The MOV may be conditional. Is the MOV the only instruction on the rung, or is there other code which might evaluate as false, and thus not operating the MOV instruction? Again, screenshot or attached code.

4) The MOV may be set up wrong. In the MOV block, the Source is "Local...." and the Dest is "myTag" (or whatever), and not the other way around, right? And the "myTag" is a DInt or Real data type?

Post again with more info and we'll see what we can do.

EDIT: Too slow. And how could I forget PROGRAM MODE !
 
Last edited:
Is there anything else that writes to DUMMY2? (Select the tag, do a CTRL+E to see if it is used elsewhere in the code).

What happens if you type a random number where the blue arrow is under the tag DUMMY2 ? Does it change or go back to '0'?

Are you certain that "SYSTEM_ENABLED" is true at the moment the program is being scanned? If it is turned OFF at the beginning of the scan, the logic will execute the JMP instruction, jumping over the rung to the LBL below. If the SYSTEM_ENABLE gets set at that point, other logic may execute. If it then gets turned back off before the next scan, the same thing will happen again.

Monitoring the bit, since it spends most of its life ON, it will appear "Green" on rung 1, but will actually not be. This has fooled more than one programmer. You may want to put a simple rung OTL(TestBit) above the MOV to see if logic is actually being scanned in that zone.

EDIT: Again too slow. Must stop being so verbose.
 

Similar Topics

I work in a field where our plc and hmi are constantly being powered fully off and on daily before being sent out. I am new to the world of plc...
Replies
5
Views
960
Please laugh… but can I take 24volts from an IO module and wire it straight into its own input card to simulate an input….?
Replies
5
Views
1,262
I need to be able to open a customer's FT View project and make any changes if necessary. Which one do I need??? :hmmm: I don't want to have...
Replies
10
Views
2,592
Hello all, i will start off by saying i know nothing about load cells, i want a converter/amplifier to output a 4/20mA signal from a load cell...
Replies
14
Views
5,398
Hi All, I don't have a ton of experience with PLCs yet, so I appreciate any feedback I can get. What I am doing is using an Omega FMA1816A mass...
Replies
7
Views
1,826
Back
Top Bottom