Red Lion DSPLE argument not processing?

Join Date
Feb 2010
Location
Washington
Posts
173
I have a DSPLE that has a tag set up to add two values. The equation is

If (tag1!=tag2) tag2:=abs (tag1+0);


Yet the value of tag 2, when viewed live, does not change. Tag 1 is in a plc, tag 2 is internal.

I have comms, b/c I can manipulate values of tag1 in the plc & see the change, and if I change variables in the RS485 devices, I can see them both in the plc & Crimson.

What am I doing wrong?
 
Last edited:
What tag holds this definition?

It may not be allowed that a tag references itself in an expression. Usually, you will get a circular reference error, but not in all cases. Sometimes no error will be detected but it won't work.

Also, the system may not repeatedly update the tag value unless it is being referenced by a screen object or has an alarm/event configured.

What are the data types of these tags? Using the wrong data type can yield unexpected results.

A bigger view of what you are trying to do might be helpful. There are usually at least three different ways to accomplish a task in Crimson...
 
I'm attempting to update a tag in a compactlogix, by comparing it to another tag in the same processor.

Okie, this is a DSLPE, so no screens, just a protocol converter.

Also, tags in both plc & RS485 devices can be viewed in Crimson when online, and update accordingly when changed by either device. The DSPLE just isn't processing the math, which makes me believe I had the expression wrong.
 
as promised, some screen shots...

http://imgur.com/a/clcAL

the images are while online w/ the DSPLE.

In the photos, you can see the tag assignment.

Tag 1 is a tag in the PLC. I can manipulate this value in the plc & see the change in the DSPLE.

Tag 2 is set to internal.

Tag 3 is the expression. The image that shows the expression has a > operator. This was taken after editing the expression because, like I stated before, I'm sure it's something I'm doing wrong... either way, it had no effect on Tag 2.

the original program had a single tag that had the expression:

[L24_PLC.xxxx.Response]=[L24PLC.xxxx.Counter];

where xxxx is just the device name.

This was installed about a year ago, and suddenly stopped triggering the count. I changed the program to add tags & expressions like above(except each tag was tied to the plc tags), and it worked yesterday. Came in today and the comms fault was true. Went online & found device had stopped processing the expression. I made the changes pictured just to see if the device would process the new tags... to no avail.
 
Last edited:
I am still not clear on what you are trying to do. If you are simply trying to write the value from one device tag into another device tag, why not use a gateway block?
 
Okie, I'm trying to recreate the comms ok routine that was working in this device.
Like I stated before, it was working, but stopped.

The plc is set up as native tag addressing via L5K file, so I shouldn't need a block. In the plc are two tags, a counter & response.

In the plc, if these are not equal, it starts a comms fault timer. If the tags are equal, a 1 is added to the counter tag.

The DSLPE should (and did) evaluate the counter tag & write the same value to the response tag. It's not doing that anymore.
 
this is getting strange...

I cleared the device & powered it down for a few minutes. Booted it back up & re-installed the same program with no luck.

So I deleted all tags in the DSLPE itself & created a new one referencing the plc comms tags directly. The equation is

if ([L24_PLC.xxx_Counter]!=[L24_PLC.xxx_Response])
[L24_PLC.xxx_Response]:=Abs([L24_PLC.xxx_Counter]+0);
else return [L24_PLC.xxx_Response];


this tag only seems to function when viewing online. I have screen shots showing the tag value, & in the background the tags in the plc are changed and the timer doesn't time out.

When I exit Crimson, or close the tag view, the tags in the plc stop updating, faulting comms again.

Any suggestions?

http://imgur.com/a/tCZeo
 
Last edited:
Okie, I'm trying to recreate the comms ok routine that was working in this device.

For each device accessed by your system add a tag something like "CommsOkay" and for the data source use IsDeviceOnline(x) where x is the device number or name.

That tag will be true (1) when communications are okay, and false when communications are not okay. I often tie that to an alarm with a delay since the Red Lion usually boots and starts talking before some hardware.

The IsDeviceOnline function may not work with all driver types and settings, but I have used it with all the A/B DF1 and Native Tag protocols over serial and Ethernet ports and with multiple different Modbus devices. IIRC, with Modbus TCP, I had to enable the ping register to allow it to work.

If you want to share that information with a device, use another event to set or increment a device tag.

Like I stated before, it was working, but stopped.

Just becuase it worked before, doesn't mean it was bulletproof. Maybe some other condition has changed which impacted your logic.

The plc is set up as native tag addressing via L5K file, so I shouldn't need a block. In the plc are two tags, a counter & response.

You can use a Gateway block with Native Tag addressing, it will simply automate the process of linking tags from one device to another.

I still don't fully understand your goal. You are deep in the weeds, but I need a picture of the forest to make better suggestions.
 
My goal is to get comments working again so my customer can use their system, but that isn't looking too good...

This system is basically a plc talking to a drive. The plc & the drive communicate, as variables in both change, as verified in the plc software, the drives display, and in Crimson. If I bypass the comms count loop for the DSPLE in the plc, the drive runs when commanded.

while this loop isn't needed, as the drive has its own comms fault bit, I am hesitant to keep this loop bypassed.

Also, why does the value change when viewed online, then stop as soon as I disconnect?
 
Last edited:
My goal is to get comments working again so my customer can use their system, but that isn't looking too good...

This system is basically a plc talking to a drive. The plc & the drive communicate, as variables in both change, as verified in the plc software, the drives display, and in Crimson. If I bypass the comms count loop for the DSPLE in the plc, the drive runs when commanded.

while this loop isn't needed, as the drive has its own comms fault bit, I am hesitant to keep this loop bypassed.

Also, why does the value change when viewed online, then stop as soon as I disconnect?

I think your problem is that you function is not running because it isn't being used anywhere. A function needs to be called to run. Try putting you logic in the On Tick event of the DSPLE and I bet it will work.

When you are viewing it, it is being referenced so it runs.
 

Similar Topics

Hello everyone I'm curious if I can create a register in the Red Lion DSPLE. What I'm trying to do is send some data via my ControlLogix to...
Replies
4
Views
1,662
Hi All, I'm a newbie to the forums here and to PLCs in general. I am working on a project where I want to use a Red Lion DSPLE to do protocol...
Replies
0
Views
1,202
Hello All, I'm investigating a Red Lion DSPLE setup that facilitates communication between an Allen Bradley PLC (ethernet) and CNC controller...
Replies
0
Views
2,479
Does anyone know how to use a Red Lion DSPLE device to swap the word ordering in MODBUS holding register messages? I'm wanting to use this...
Replies
1
Views
3,220
Hey guys, I am trying to make an Allen Bradley Compactlogix and a Modicon Quantum talk to each other using a Red Lion Data Station. So far I've...
Replies
2
Views
3,012
Back
Top Bottom